black

Java认证考试综合练习

登录

单项选择题

现有: 
class  Wrench2  {     
int size; 
public static void main(String  []  args)  {     
Wrench2 w=new Wrench2();     
w.size=II; 
Wrench2 w2=go(w, w.size);    
System. out .print (w2. size);     
} 
static Wrench2 go(Wrench2 wr. int s)  {     
S=12; 
return wr;    
}    
}
结果为()    

A. 11
B. 12
C.编译失败
D.运行时异常被抛出

相关考题

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

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

All Rights Reserved 版权所有©计算机考试题库(jsjtiku.com)

备案号:湘ICP备14005140号-4

经营许可证号:湘B2-20140064