public class SimpleArray2 {
public static void main(String[] args) {
int score[] = new int[] {90, 85, 55, 94, 77};
for(int i = 0; i < score.length; i++)
System.out.printf("score[%d] = %d\n", i, score[i]);
}
}例如System.out.printf("score[%d] = %d\n", i, score[i]); 里面的printf会报错说“方法不使用”
请问怎么解决?我的是jdk1.6的
public static void main(String[] args) {
int score[] = new int[] {90, 85, 55, 94, 77};
for(int i = 0; i < score.length; i++)
System.out.printf("score[%d] = %d\n", i, score[i]);
}
}例如System.out.printf("score[%d] = %d\n", i, score[i]); 里面的printf会报错说“方法不使用”
请问怎么解决?我的是jdk1.6的
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货