在eclipse中使用System.out.printf()报错
在eclipse中使用System.out.printf()报错
错误描述:The method printf(String, Object[]) in the type PrintStream is not applicable for the arguments (String,int)
错误和JDK的本版相关,具体的原因是Compiler comlicance level的数值太低。将Compiler comlicance level设置为大于1.5,重新建立工程即可。
解决方法:
Window >> Properties >> Java >> Compiler >> Compiler comlicance level。