Search This Blog

Total Pageviews

java.util.MissingFormatArgumentException: Format specifier 's'

How to resolve MissingFormatArgumentException.

java.util.MissingFormatArgumentException: Format specifier 's'
at java.util.Formatter.format(Formatter.java:2487)
at java.util.Formatter.format(Formatter.java:2423)
at java.lang.String.format(String.java:2845)

The passed in arguments should match with number of %s in String.format() method.

String.format("My name %s and my city %s","P"); Throws Exception

String.format("My name %s and my city %s","Java", "JavaCity");


Vale Co Xenia said...

Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Java developer learn from Java Training in Chennai. or learn thru Java Online Training from India . Nowadays Java has tons of job opportunities on various vertical industry.

WUGI said...

Lots of game slots only here play casino games convenient Do not wait! Win right here and now.

qualityshop said...

rolex watches

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...