当前位置:SCJP程序员认证考试题库

问题:

[单选]

public class test {  
public static void add3 (Integer i){ 
int val = i.intValue ( );  
val += 3;  
i = new Integer (val);  
 }   
 public static void main (String args [ ] ) 
{ Integer i = new Integer (0);   
add3 (i);  
system.out.printIn (i.intValue ( ) );  
}   
}  
What is the result?()

A .  Compilation will fail.
B .  The program prints “0”.
C .  The program prints “3”.
D .  Compilation will succeed but an exception will be thrown at line 3.

创业贷款扶持的对象主要是()。 国有企业。 大型企业。 中型企业。 小微企业。 路基出现翻浆、弹软的原因?处理方法有哪些? 起重设备安装前,应检查设备技术文件是否齐全、有无出厂合格证、有无必要的出厂试验记录、()等。 出厂一检验单位的资格。 场地是否合适。 材料及附件的型号、规格和数量,且应符合设计和设备技术要求。 客户忠诚可能带来的效果 轨道的直线度,可用()进行检查。 盒尺。 深度游标卡尺。 米尺。 拉钢丝。 千分尺。 游标卡尺。 塞尺。 秒表。 坡度尺。 经纬仪。

public class test {  
public static void add3 (Integer i){ 
int val = i.intValue ( );  
val += 3;  
i = new Integer (val);  
 }   
 public static void main (String args [ ] ) 
{ Integer i = new Integer (0);   
add3 (i);  
system.out.printIn (i.intValue ( ) );  
}   
}  
What is the result?()

参考答案:

  参考解析

本题暂无解析

在线 客服