black

Java认证考试综合练习

登录

单项选择题

现有: 
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++);     }     结果是什么?()

单项选择题 现有:  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);      }     }      结果为:()

单项选择题 现有如下五个声明:  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;      哪行无法通过编译?()

All Rights Reserved 版权所有©易学考试网(yxkao.com)

备案号:湘ICP备2022003000号-3