Here is how i would do it:
int[][] array = { { 1, 2, 3, 4, 5, 6 },
{ 7, 6, 8, 3 },
{ 1, 2, 3, 4 },
{ 1, 2, 3, 9, 5, 6, 32, 3125423 },
{ 8, 3 },
{ 1, 2, 3, 4, 5, 6 } };//same as first row
external: for (int i = 0; i < array.length; i++) {
for (int j = i + 1; j < array.length; j++) {
if (Arrays.equals(array[i], array[j])) {
System.out.println("Row: " + i + " is the same as row: " + j+" (warning! 0 oriented!)" );
break external;
}
}
}
As you see, array[] is quite random, but the first row (row 0) is the same as the last (row 5) so what i do then, is to loop through the array once and in every pass loop through the remaining rows of the array. Then i compare the arrays to chech if they are the same. As you see the code prints out a message and then terminates (stoping the external loop)
This is based on a simple sort algorythm.
EDIT #1 As @4castle pointed out in the comments, in the context of a method the break statement is not required and can be replaced by return.