Here you can find the source of clone(boolean[] in)
public static boolean[] clone(boolean[] in)
//package com.java2s; //License from project: Apache License public class Main { public static boolean[] clone(boolean[] in) { boolean[] ret = new boolean[in.length]; System.arraycopy(in, 0, ret, 0, in.length); return ret; }//from ww w . j a v a 2s . c o m public static int[] clone(int[] in) { int[] ret = new int[in.length]; System.arraycopy(in, 0, ret, 0, in.length); return ret; } public static double[] clone(double[] in) { double[] ret = new double[in.length]; System.arraycopy(in, 0, ret, 0, in.length); return ret; } public static float[] clone(float[] in) { float[] ret = new float[in.length]; System.arraycopy(in, 0, ret, 0, in.length); return ret; } public static short[] clone(short[] in) { short[] ret = new short[in.length]; System.arraycopy(in, 0, ret, 0, in.length); return ret; } public static char[] clone(char[] in) { char[] ret = new char[in.length]; System.arraycopy(in, 0, ret, 0, in.length); return ret; } public static long[] clone(long[] in) { long[] ret = new long[in.length]; System.arraycopy(in, 0, ret, 0, in.length); return ret; } public static byte[] clone(byte[] in) { byte[] ret = new byte[in.length]; System.arraycopy(in, 0, ret, 0, in.length); return ret; } public static Object[] clone(Object[] in) { Object[] ret = new Object[in.length]; System.arraycopy(in, 0, ret, 0, in.length); return ret; } }