public class test1 {
private int i = 0;
public test1(int i) {
this.i = i;
}
public static void process(test1 obj) {
obj = new test1(99);
obj.i --;
}
public static void main(String[] argv) {
test1 o1 = new test1(1);
process(o1);
System.out.println("o1.i=" + o1.i);
}
}
为什么输出结果就是 o1.i=1 求指导