Here you can find the source of invert(int[] v)
public static int[] invert(int[] v)
//package com.java2s; //License from project: Open Source License public class Main { /**// w w w. j a v a2s . c o m * Inverts an array from left to right. */ public static double[] invert(double[] v) { double[] w = new double[v.length]; for (int k = 0; k < v.length; k++) { w[v.length - 1 - k] = v[k]; } return (w); } /** * Inverts an array from left to right. */ public static int[] invert(int[] v) { int[] w = new int[v.length]; for (int k = 0; k < v.length; k++) { w[v.length - 1 - k] = v[k]; } return (w); } }