62,614
社区成员
发帖
与我相关
我的任务
分享
public class Demo {
public static void main(String[] args) {
Integer i = new Integer(0);
Demo d = new Demo();
d.addOne(i);
System.out.println("Out of fucntion : " + i);
}
public void addOne(Integer i) {
i++;
System.out.println("In function : " + i);
}
}
Integer a = new Integer(5);
Integer b = new Integer(10);
Integer c = a;
c = a+b;
public void addOne(Integer i) {
//i++;
i = i.intValue();
i = Integer.valueOf(i);
//int i = b;
//Integer b = i;
// int c = i;
//System.out.println("In function : " + i);
}
public void addOne(Integer i) {
i++;
// int a = i.intValue();
// int b = Integer.valueOf(a++);
Integer b = i;
int c = i;
//System.out.println("In function : " + i);
}
public void addOne(Integer i) {
//i++;
int a = i.intValue();
int b = Integer.valueOf(a++);
//System.out.println("In function : " + i);
}