I am trying to reverse an int array in Java.
This method does not reverse the array.
for(int i = 0; i < validData.length; i++) { int temp =
static int[] reverseArray(int[] a) { int ret[] = new int[a.length]; for(int i=0, j=a.length-1; i=0; i++, j--) ret[i] = a[j]; return ret; }