返回二维布尔数组的深度克隆。
//package com.nowjava; /** 来 自 时 代 J a v a 公 众 号 - N o w J a v a . c o m**/ public class Main { /** * Returns a deep clone of a 2D boolean array. * * @param src The 2D-array to clone * @return | deepEquals(result, src) * @return | !src.equals(result) * @return | for each int rowNumber in 0..src.lenght-1: * | !src[rowNumber].equals(result[rowNumber]) */ public static boolean[][] deepClone(boolean[][] src) { assert (src != null); boolean[][] dest = new boolean[src.length][]; for