A.x[9]为0
B.x[9]未定义
C.x[10]为0
D.x[0]为空
public class Test {
public static void main(String[] args) {
int[] x = new int[10];
System.out.println("x[9] = " + x[9]);
}
}
答案A
x[10]抛异常ArrayIndexOutOfBoundsException
A.x[9]为0
B.x[9]未定义
C.x[10]为0
D.x[0]为空
public class Test {
public static void main(String[] args) {
int[] x = new int[10];
System.out.println("x[9] = " + x[9]);
}
}
答案A
x[10]抛异常ArrayIndexOutOfBoundsException