Here you can find the source of deepEquals(boolean[] array1, boolean[] array2)
Parameter | Description |
---|---|
array1 | a parameter |
array2 | a parameter |
public static boolean deepEquals(boolean[] array1, boolean[] array2)
//package com.java2s; //License from project: Open Source License public class Main { /**/* w ww . j a v a2 s . co m*/ * Compares the two boolean arrays deeply * @param array1 * @param array2 * @return false if arrays have different length or different values at a specific index, * true otherwise */ public static boolean deepEquals(boolean[] array1, boolean[] array2) { if (array1.length != array2.length) return false; for (int i = 0; i < array1.length; i++) { if (!(array1[i] == array2[i])) return false; } return true; } }