black

Java认证考试综合练习

登录

单项选择题

现有代码片段:     
String  s="123";     
String sl=S+456; 
请问sl的结果是哪项?()     

A. 123456
B. 579
C.编译错误
D.运行时抛出异常

相关考题

单项选择题 现有:      class Test2  f  public  static void main (String  []  args)  {      short a,b,C;      a=l;      b=2;  C=a+b;      a+=2:      }        以上代码中,哪一句是错误的?()

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

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

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

备案号:湘ICP备14005140号-4

经营许可证号:湘B2-20140064