Here you can find the source of invert(Object[] array)
public static void invert(Object[] array)
//package com.java2s; public class Main { public static void invert(Object[] array) { int i, j; Object cell;/*from w ww. ja v a 2 s .com*/ for (i = 0, j = array.length - 1; i < j; i++, j--) { cell = array[i]; array[i] = array[j]; array[j] = cell; } } }