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 =
public class ArrayHandle { public static Object[] reverse(Object[] arr) { List list = Arrays.asList(arr); Collections.reverse(list); return list.toArray(); } }