- #1
Hiche
- 84
- 0
Code:
int[] aCopy = new int[a.length];
for (int i = 0; i < a.length; i++)
aCopy[i] = a[i];
Is this the way to 'copy' an array? Basically, I want the elements inside the the array a to be copied or assigned to the array aCopy.