//复制数组、数组复制 //深拷贝,数组改变后,原数组不会发生变化 int [] b= Arrays.copyOf(candies, candies.length);;
//浅拷贝,数组改变后,原数组也跟着发生了变化 int [] b=candies;
//复制数组、数组复制 //深拷贝,数组改变后,原数组不会发生变化 int [] b= Arrays.copyOf(candies, candies.length);;
//浅拷贝,数组改变后,原数组也跟着发生了变化 int [] b=candies;
本文详细的介绍了,在Java 中数组的使用,并对其内存存在形式进行了详细的分析。
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M