编译并运行以下代码会发生什么情况?( )
public class Anchor {
public static void main(String[] argv) {
new Anchor();
}
public Anchor() {
String s[][] = new String[2][2];
System.out.println(s[1][1]);
System.out.println(s[1][2]);
}
}编译错误
编译并在运行时打印两行空行
编译并打印null,然后出现ArrayIndexOutOfBoundsException
编译并打印一个空行,然后出现ArrayIndexOutOfBoundsException
s[1][1]是null,会打印null
s[1][2]数组越界了,会抛出异常
s[1][2]数组越界了,会抛出异常