Here you can find the source of equals(final T[][] a, final T[][] b)
public static <T> boolean equals(final T[][] a, final T[][] b)
//package com.java2s; //License from project: Apache License import java.util.Arrays; public class Main { public static <T> boolean equals(final T[][] a, final T[][] b) { if (a == b) { return true; }/*from ww w .j a va2s . c o m*/ if (a == null || b == null) { return false; } if (a.length != b.length) { return false; } for (int i = 0; i < a.length; ++i) { if (!Arrays.equals(a[i], b[i])) { return false; } } return true; } public static boolean equals(final int[][] a, final int[][] b) { if (a == b) { return true; } if (a == null || b == null) { return false; } if (a.length != b.length) { return false; } for (int i = 0; i < a.length; ++i) { if (!Arrays.equals(a[i], b[i])) { return false; } } return true; } public static <T> boolean equals(final T[][][] a, final T[][][] b) { if (a == b) { return true; } if (a == null || b == null) { return false; } if (a.length != b.length) { return false; } for (int i = 0; i < a.length; ++i) { if (!equals(a[i], b[i])) { return false; } } return true; } public static boolean equals(final int[][][] a, final int[][][] b) { if (a == b) { return true; } if (a == null || b == null) { return false; } if (a.length != b.length) { return false; } for (int i = 0; i < a.length; ++i) { if (!equals(a[i], b[i])) { return false; } } return true; } }