How to copy an array

Nope, it‘s right. It‘s because arrays are only referenced by assigning them with a = b.
Example :
double[] a = {1.0, 2.0, 3.0};
double[] b = a;
b[0] = 100.0;
//a = {100.0,2.0,3.0}
//b = {100.0, 2.0, 3.0}

You can use b = arrayCopy(a); to avoid this.

1 Like