I am having a final class NameAndValue. I copied an array of NameAndValue objects using System.arrayCopy() and when i changed a
NameAndValue
System.arrayCopy()
int[] a = {1, 2, 3}; int[] b = new int[3]; System.arraycopy(a, 0, b, 0, 3); b[1] = 0; System.out.println(Arrays.toString(b)); System.out.println(Arrays.toString(a));
The output is like this: [1, 0, 3] [1, 2, 3]