{{theTime}}

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");


No comments:

Java Sequenced Collection Java Sequenced Collection The Sequenced Collection feature was introduced in Jav...