3 public class ArrayUtils
6 * Reverse the given array 'in situ'
10 public static void reverseIntArray(int[] arr)
15 * swap [k] with [end-k] up to the half way point in the array
16 * if length is odd, the middle entry is left untouched by the excitement
18 int last = arr.length - 1;
19 for (int k = 0; k < arr.length / 2; k++)
22 arr[k] = arr[last - k];