求助:eclipse中用printf不能输出
public class Test {
public static void main(String[] args) {
double x=10000.0/3;
System.out.printf("%8.2f",x);
}
}
以上会有编译错误,
The method printf(String,Object[]) in the type PrintStream is not applicable for the arguments(String,double)
我看到网上有人说:--
不是Elipse不支持, 而是JDK1.5版本才支持,你的ECLIPSE可能是比较老的版本的
不支持JDK1.5,要么就是你没有设置好你的ECLIPSE,因为以前的ECLIPSE版本默认是使用1.4来编译的 --
我的JDK1.6
请高手指点是怎么回事?