Hi all,
This may be a stupid question, but how do you copy the content of one array to another.
I tried many different ways but it keep give the location of the pointer in memory rather than the right data.
Here is what I tried:
Code:static double[] cloneArray(double original[], int n) { double[] temp = new double[n]; for (int i = 0; i < n; i++) { temp[i] = original[i]; } return temp; }
Thanks in advance.