阅读背景:

克隆一维数组和二维数组有什么不同

来源:互联网 

I first cloned 1D primitive array(It will hold wrappers) and then changed first value of the cloned array. But the first value of the original array was not changed. Then I cloned a 2D array and did the same.(changed the array[0][0] value).There the value was at originalArray[0][0] also was changed. Why this is happening. Is this due to shallow copy and deep copy?I first cloned 1D primitive array(It will hold




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: