0

Error in Eclipse IDE while using Formatter class

The method format(Locale, String, Object[]) in the type Formatter is not applicable for the arguments (String, String, String, String) i get this error in eclipse but it is working in command prompt.

25th Feb 2017, 8:09 PM
Yash Jain
Yash Jain - avatar
3 Answers
+ 4
You should trust Eclipse in this case ^^ format(Locale l, String format, Object... args) Writes a formatted string to this object's destination using the specified locale, format string, and arguments. format(String format, Object... args) Writes a formatted string to this object's destination using the specified format string and arguments. From https://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html#method_summary
25th Feb 2017, 9:09 PM
Tashi N
Tashi N - avatar
+ 1
this means that you are trying to pass 4 strings through the function instead of what the parameters are supposed to be.
25th Feb 2017, 8:59 PM
Michael Szczepanski
Michael Szczepanski - avatar
0
My Error get solved in changing the Compiler compliance level from 1.4 to 1.7 .
1st Mar 2017, 1:59 PM
Yash Jain
Yash Jain - avatar