I was trying to reverse elements in a character array using the Collections.reverse() method in java. It wasn't reversing them so i took an integer array as was used in the example i was referring to with no success
Here is my code
int[] intarr = {1,2,3,5,7,8};
System.out.println(Arrays.toString(intarr));
Collections.reverse(Arrays.asList(intarr));
System.out.println(Arrays.toString(intarr));
It returns two lists same as the input! what's going wrong here?