我的意思是,当我们从该函数返回时,数组的地址与我们进入函数之前的地址相同。一个例子:
class sdasd {
public static void main(String[] args){
int[] obj = new int [7];
//obj has an address
sdasd t = new sdasd();
t.func(obj);
//obj has the same address as before!!
}
void func(int[] obj){
int[] otherObj = new int[13];
obj=otherObj;``
//we changed the address of the array 'obj'?
}
}
谢谢你的帮助