下面程序段的运行结果为()。public class OperatorsAndExpressions {void equalsMethod2(){String s1=new String(“hello”);String s2=new String(“hello”);System.out.println(s1.equals(s2));class MyValue{int i
B.true false
C.false false
D.false true
B.true false
C.false false
D.false true
A.0 0
B.0 1
C.false false
D.false true
A.82 A
B.82 65
C.82.5 A
D.82.5 65
A.无输出
B.H\\\115
C.H\M
D.H115
A.length=20 charAt=t
B.length=20 charAt=s
C.length=4 charAt=s
D.length=4 charAt=t
A.The result is:16 The result is:8.0
B.The result is:8.0 The result is:16
C.The result is:8 The result is:16.0
D.The result is:16.0 The result is:8
A.x=10静态变量a.x=10实例变量b.y=40
B.x=0静态变量a.x=10实例变量b.y=40
C.x=10静态变量a.x=30实例变量b.y=40
D.x=0静态变量a.x=30实例变量b.y=40
A.a[0]=1 b[0]=1 a[0]=10 b[0]=1
B.a[0]=1 b[0]=10 a[0]=1 b[0]=10
C.a[0]=10 b[0]=1 a[0]=10 b[0]=1
D.a[0]=10 b[0]=10 a[0]=1 b[0]=1
public class J_Test {
public static void main(String[] args) {
int[] a = new int[5];
boolean[] b = new boolean[5];
System.out.println(a[4]);
System.out.println(b[5]);
}
}
A.程序可以通过编译并正常运行,结果输出“0false”
B.程序可以通过编译并正常运行,结果输出“1true”
C.程序无法通过编译
D.程序可以通过编译,但无法正常运行
执行下面的程序段,输出结果为【 】。 public class Q { public Static Void main(String args[]) { int anar[]=new int[5]; System.out.println(anar[0]); } }