public static char[] copy(final char[] array){
  char[] next=new char[array.length];
  System.arraycopy(array,0,next,0,array.length);
  return next;
}

public static char [ ] copy ( final char [ ] array ) { char [ ] next = new char [ array . length ] ; System . arraycopy ( array , 0 , next , 0 , array . length ) ; return next ; }
returns a copy of an array .
