下列程序的运行结果是()。public class Animal {static int a[ ]=new int[10];public static void main(String args ) {System.out.println(a[9]);}}
A. 输出零
B. 编译时正确,运行时将产生错误
C. 输出空
D. 编译时将产生错误
查看答案
下面程序的运行结果是()public class Test {public static void main(String[] args) {String s1 = new String(“Hello”);String s2 = new String(“Hello”);boolean b1 = s1.equals(s2);boolean b2 = s1 ==
A. false, true
B. true, false
C. false, false
D. true, true
下面程序的运行结果为?public class ish{public static void main(String[] args) {String s=”call me!”;System.out.print(s.charAt(s.length()-1));}}
A. e
B. c
C. !
D. s
下列代码段执行后的结果是()。int[] a={6,8,3,1,2};int j=4;for(int i=0; i<2; i++)a[i] = a[j–];for(int i=0; i<5; i++)System.out.print(a[i]+ ” “)
A. 1 2 3 6 8
B. 1 2 3 1 2
C. 2 1 3 8 6
D. 2 1 3 1 2
break语句()
A、只中断最内层的循环
B、只中断最外层的循环
C、借助于标号,可以实现任何外层循环中断
D、只中断某一层的循环