System.out.printf("Hello,%s!Next year you will be %d years old",name,age++);在eclipse中输入这一段,提示有错误,The method printf(String, Object[]) in the type PrintStream is not applicable
for the arguments (String, String, int);请问这是怎么回事?应该怎么写才对?
for the arguments (String, String, int);请问这是怎么回事?应该怎么写才对?
很基础的东西,你不会真的不知道吧?
System.out.println("Hello " + name + "!" + "Next year you will be " + age++ + " years old!");
意思就是第一个为string,第二个为object[].
按右键->Properties->compiler
把编译调查成1.5或以上而不是1.4 or 1.3
再试试。
我看了下设置,JDK是1.4,就是这个原因了……