安装了jdk1.6.0 printf方法不能用
我安装的jdk1.6.0 环境变量也设了! 去cmd里java和javac都行但去eclipse里用printf方法报错? 这是为什么?
System.out.printf("%d", 5);
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The method printf(String, Object[]) in the type PrintStream is not applicable for the arguments (String, int)
at Sum1.main(Sum1.java:15)
谢谢了!