日期:2014-05-20 浏览次数:20809 次
public class TestStr {
public String str="1234";
public Integer number=10;
public void changeStr(String s){
s="hello";
}
public void changeInt(Integer i){
i=20;
}
public static void main(String[] arg0) {
TestStr test = new TestStr();
test.changeStr(test.str);
test.changeInt(test.number);
System.out.println(test.str);
System.out.println(test.number);
}
}