Search This Blog

Total Pageviews

Exception in thread "main" java.util.UnknownFormatConversionException

Exception in thread "main" java.util.UnknownFormatConversionException: Conversion = 'p'
at java.util.Formatter$FormatSpecifier.conversion(Formatter.java:2691)
at java.util.Formatter$FormatSpecifier.<init>(Formatter.java:2720)
at java.util.Formatter.parse(Formatter.java:2560)
at java.util.Formatter.format(Formatter.java:2501)
at java.util.Formatter.format(Formatter.java:2455)
at java.lang.String.format(String.java:2928)
at ProgramStack.java:39)

This is caused by not using the correct format in String.format() method.

Error code:  System.out.println(String.format("I am  a % programmer",name)) ;

Fix:  System.out.println(String.format("I am  a %s programmer","java")) ;

No comments:

gradlew : The term 'gradlew' is not recognized as the name of a cmdlet, function, script file , or operable program

The command gradlew was not found, but does exist in the current location.  Windows PowerShell does not load commands from the current locat...