正在加载图片...
33.编译并运行下面的代码,会发生什么情况? public class Q t public static void main( string argVIX int anal= new int[K 1, 2, 31 System. out. printin(anar[O); B. Error anar is referenced before it is initialized D. Error size of array must be defined 4.编译并运行下面的代码,会发生什么情况 public class Q public static void main( String argvIX int anal= new int[5] System. out. printIn(anar[oD) A. Error: anar is referenced before it is initialized B null 5 35编译并运行下面的代码,会打印出 int i=1: switch(X case 0: System.out. println("zero") break. case 1: System.out. printIn("one ): case 2: System. out. println(two) break default System. out. println(default); A one B one. default C. one, two , default D. default 36.在java中,哪一个关键字使类不能派生出子类。 A. final B. public C. private D. volatile 37.在Java语言中,下列语句中正确的是哪个? A. String temp[=new String(j"a""z B. String temp[=(j"b""c"j C. String temp=(a"""j D. String temp[=i"a,b","c"i: 38在Java中,要处理 Button类对象的事件,以下各项中,哪个是可以处理这个事件的接 A. FocusListener B. ComponentListener C. WindowListener33. 编译并运行下面的代码,会发生什么情况? public class Q { public static void main(string argv[]){ int anar[] = new int[]{1,2,3}; System.out.println(anar[0]); } } A. 1 B. Error anar is referenced before it is initialized C. 2 D. Error size of array must be defined 34. 编译并运行下面的代码,会发生什么情况: public class Q { public static void main(String argv[]){ int anar[] = new int[5]; System.out.println(anar[0]); } } A. Error: anar is referenced before it is initialized B. null C. 0 D. 5 35. 编译并运行下面的代码,会打印出: int i = 1; switch(i){ case 0: System.out.println(“zero”); break; case 1: System.out.println(“one”); break; case 2: System.out.println(“two”); break; default: System.out.println(“default”); } A. one B. one, default C. one, two, default D. default 36. 在 java 中,哪一个关键字使类不能派生出子类。 A. final B. public C. private D. volatile 37. 在 Java 语言中,下列语句中正确的是哪个? A. String temp[]=new String {"j" "a" "z"}; B. String temp[]= {"j" "b" "c"}; C. String temp= {"a" "b" "c"}; D. String temp[]= {"a", "b" ,"c"}; 38. 在 Java 中,要处理 Button 类对象的事件,以下各项中,哪个是可以处理这个事件的接 口。 A. FocusListener B. ComponentListener C. WindowListener
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有