public static int[] copy(int[] array){
  if (array != null) {
    int[] copy=new int[array.length];
    System.arraycopy(array,0,copy,0,array.length);
    return copy;
  }
  return null;
}

public static int [ ] copy ( int [ ] array ) { if ( array != null ) { int [ ] copy = new int [ array . length ] ; System . arraycopy ( array , 0 , copy , 0 , array . length ) ; return copy ; } return null ; }
returns a copy of the given integer array .
