欢迎来到求知题库网 求知题库官网
logo
全部科目 > Java认证考试 > 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.println(i.intValue()); 
} 
}  
What is the result? () 

    A. 0
    B. 3
    C. Compilation fails.
    D. An exception is thrown at runtime.

点击查看答案&解析

相关考题

微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题