国家开放大学 / Java语言程序设计
【单项选择题】给出下面代码,关于该程序以下哪个说法是正确的?( )
public class Person{
static int arr[] = new int[5];
public static void main(String a[])
{
System.out.println(arr[0]);
}
}
编译时将产生错误
编译时正确,运行时将产生错误
输出零
输出空
public class Person{
static int arr[] = new int[5];
public static void main(String a[])
{
System.out.println(arr[0]);
}
}
编译时将产生错误
编译时正确,运行时将产生错误
输出零
输出空
参考答案: