在java中如何修改方法参数的值
答案是
package myapp;
import org.omg.CORBA.IntHolder;
public class Test2 {
public static void change(IntHolder x) {
x.value = 3*x.value;
}
public static void main(String[] args) {
IntHolder i = new IntHolder(55);
change(i);
System.out.println(i.value);
}
}