Java tutorial
//package com.java2s; public class Main { /** * Return a clone of the given char array. No null checks are performed. * * @param array the array to clone * @return the clone of the given array */ public static char[] clone(char[] array) { char[] result = new char[array.length]; System.arraycopy(array, 0, result, 0, array.length); return result; } }