Here you can find the source of cloneArray(boolean[][] src)
public static boolean[][] cloneArray(boolean[][] src)
//package com.java2s; //License from project: Open Source License public class Main { public static boolean[][] cloneArray(boolean[][] src) { int length = src.length; boolean[][] target = new boolean[length][src[0].length]; for (int i = 0; i < length; i++) { System.arraycopy(src[i], 0, target[i], 0, src[i].length); }//from w w w . j a va 2s . co m return target; } }