Here you can find the source of copyOf(boolean[] t)
public static boolean[] copyOf(boolean[] t)
//package com.java2s; //License from project: Apache License import java.util.ArrayList; import java.util.List; public class Main { public static <T> T[] copyOf(T[] src, T[] dest) { List<T> l = new ArrayList<T>(); for (int i = 0; i < src.length; i++) { T ti = src[i];/* w ww .j av a 2s .c om*/ l.add(ti); } return l.toArray(dest); } public static boolean[] copyOf(boolean[] t) { boolean[] out = new boolean[t.length]; for (int i = 0; i < t.length; i++) { out[i] = t[i]; } return out; } }