单项选择题
现有:
class Wrench f
public static void main(String [] args) {
Wrench w=new Wrench(); Wrench w2=new Wrench();
w2=go (w, w2);
System.out.print (w2==w);
}
static Wrench go (Wrench wrl, Wrench wr2) {
Wrench wr3=wrl; wrl=wr2; wr2=wr3;
return wr3;
}
结果是什么?()
A. false
B. true
C.编译失败
D.运行的时候有异常抛出
点击查看答案&解析
相关考题
-
单项选择题
现有: class Passer f static final int X=5; public static void main (String [] args) { new Passer().go (x); System. out .print (x); } void go (int x) { System. out .print(x++); } 结果是什么?()
A.55
B.56
C.65
D.66 -
单项选择题
现有: class Top { static int x=l; public Top (inty) { x*=3; } } class Middle extends Top { public Middle() {x+=1; ) public static void main (String [] args) { Middle m = new Middle(); System. out .println (x); } } 结果为:()
A.1
B.2
C.3
D.编译失败 -
单项选择题
现有如下五个声明: Linel: int a_really_really_really_long_variable_name=5 ; Line2: int _hi=6; Line3: int big=Integer. getlnteger("7”); Line4:int $dollars=8; line5: int %opercent=9; 哪行无法通过编译?()
A.Line1
B.Line3
C.Line4
D.Line5
