Here you can find the source of arrayCopy(char[] chars)
public static char[] arrayCopy(char[] chars)
//package com.java2s; //License from project: Apache License public class Main { public static char[] arrayCopy(char[] chars) { if (chars == null) return null; char[] copy = new char[chars.length]; System.arraycopy(chars, 0, copy, 0, chars.length); return copy; }//from w ww . j a v a 2 s . c o m }