网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
Giventhefollowingcode:publicclassPerson{intarr[]=newint[10];publicstaticvoidmain(Stringa[]){System.out.println(arr[1]);}}Whichstatementiscorrect?()

A.Whencompilationsomeerrorwilloccur.

B.Itiscorrectwhencompilationbutwillcauseerrorwhenrunning.

C.Theoutputiszero.

D.Theoutputisnull.


参考答案

更多 “ Giventhefollowingcode:publicclassPerson{intarr[]=newint[10];publicstaticvoidmain(Stringa[]){System.out.println(arr[1]);}}Whichstatementiscorrect?() A.Whencompilationsomeerrorwilloccur.B.Itiscorrectwhencompilationbutwillcauseerrorwhenrunning.C.Theoutputiszero.D.Theoutputisnull. ” 相关考题
考题 阅读下列代码后 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.编译时将产生错误

考题 Giventhefollowingcode:publicclassPerson{staticintarr[]=newint[10];publicstaticvoidmain(Stringa[]){System.out.println(arr[1];)}}Whichstatementiscorrect?() A.Whencompilationsomeerrorwilloccur.B.Itiscorrectwhencompilationbutwillcauseerrorwhenrunning.C.Theoutputiszero.D.Theoutputisnull.

考题 阅读下列代码后 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.输出空

考题 给出下面代码:public class Person{static int arr[] = new int[10];public static void main(String a[]) {System.out.println(arr[1]);}}以下那个说法正确? A. 编译时将产生错误;B. 编译时正确,运行时将产生错误;C. 输出0;D. 输出null。

考题 给出下面代码,关于该程序以下哪个说法是正确的public class Person{ static int arr[] = new int[5]; public static void main(String a[]) { System.out.println(arr[0]); } }A.输出0B.编译错误C.运行时刻异常D.输出为空