Java数组的克隆方法

62 浏览
0 Comments

Java数组的克隆方法

在Java中,当使用clone()方法复制一个数组时,它会返回一个新的数组,该数组中的数据是从原始数组复制而来的。例如:

int[] a = {1,2,3};
int[] b = a.clone();

0