I tried to make an independent copy of an array but couldnt get one. see i cannot copy it integer by integer using a for loop because of efficiency reasons. Is there any oth
Look at System.arraycopy() method. Like,
int[] b = new int[a.length]; System.arraycopy(a, 0, b, 0, a.length);