阅读下列代码后 publicclass Person{ intarr[]=new int[10]; publicstaticvoidmain(Stringargs[]){ System.out.println(alt[1]); } } 正确的说法是( )。A.编译时将产生错误B.编译时正确,运行时将产生错误C.输出零D.输出空

阅读下列代码后 publicclass Person{ intarr[]=new int[10]; publicstaticvoidmain(Stringargs[]){ System.out.println(alt[1]); } } 正确的说法是( )。

A.编译时将产生错误

B.编译时正确,运行时将产生错误

C.输出零

D.输出空


相关考题:

阅读下列代码 public class { public static void main(String args[]){ double d=12.3; Decrementer dec=new Decrementer(); dec. decrement(D) ; System. out. println(D) ; } } class Decrementer{ public void decrement(double decMe){ decMe=decMe-1.0; } } 代码执行后输出结果是A.12.3B.11.3C.13.3D.-1.0

阅读下列代码 public class Test{ public static void main(String args[]){ System. out. println((2<0)? 10:8); } } 其运行结果是A.2B.0C.10D.8

阅读下列代码 public class Test{ String s="One World One Dream"; public static void main(String args[]){ System. out. println(s); } } 其运行结果是A.argsB.One World One DreamC.sD.编译时出错

阅读下列代码后 public class Person{ int arr[]=new int[10]; public static void main(String args[]){ System.out.println(arr[1]); } } 正确的说法是( )。A.编译时将产生错误B.编译时正确,运行时将产生错误C.输出零D.输出空

阅读下列代码后publicclassPerson{intarr[]newint[10];publicstaticvoidmain(Stringargs[]){System.out.println(arr[1]);}}正确的说法是()。 A.输出零B.输出空C.编译时正确,运行时将产生错误D.编译时将产生错误

阅读下列代码后 public class Person{ int arr[]=new int[10]; public static void main(String args[]){ System.out.println (arr[1]); } } 正确的说法是( )。A.编译时将产生错误B.编译时正确,运行时将产生错误C.输出零D.输出空

阅读下列代码后 public class Person{ int arr[]=new int[10]; public static void main(String args[]){ System.out.println(arr[1]); } } 正确的说法是A.编译时将产生错误B.编译时正确,运行时将产生错误C.输出零D.输出空

阅读下列代码后public class Person{ int arr[]=new int[10]; public static void main(String args[]){ System.out.println(arr[1]); }}正确的说法是A.编译时将产生错误B.编译时正确,运行时将产生错误C.输出零D.输出空

阅读下列代码后 public class Person{ int arr[]=new int[10]; public static void main(String args[]){ System.out.println(arr[1]); } } 正确的说法是( )。A.编译时将产生错误B.编译时正确,运行时将产生错误C.输出零D.输出空