int[][] a = new int[][] {{1}, {2}, {3, 4}}; int[][] b = new int[][] {{1}, {2}, {3, 4}}; int[][] c = new int[][] {{1}, {2}, {3}, {4}}; java.util.Arrays.deepEquals(a, b) // true java.util.Arrays.deepEquals(b, c) // false