black

Java认证考试综合练习

登录

单项选择题

class Wrench { 
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 wr1, Wrench wr2) { 
Wrench wr3 = wr1; wr1 = wr2; wr2 = wr3; 
return wr3;
} 
} 
结果是什么?() 

A.true
B.false
C.编译失败
D.输出不可预期

相关考题

单项选择题 class Passer {  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);  }  }  结果是什么?()

单项选择题 class Beta {  public static void main(String [] args) {  Integer x = new Integer(6) * 7;  if (x != 42) {  System.out.print("42 ");  } else if (x 〈 new Integer(44-1)) {  System.out.println("less");  } else {  System.out.print("done"); } } }  结果是什么?()

单项选择题 假设有字符串“123”,能把该字符串变成整数的方法是哪几项?()

All Rights Reserved 版权所有©求知题库网库(csqiuzhi.com)

备案号:湘ICP备14005140号-1

经营许可证号:湘B2-20140064