Just write this testin a test class
@Test
public void testArray() {
int[] A = {1,2};
int[] B = {1,2};
assertTrue(Arrays.equals(A, B));
assertTrue(A.equals(B));
assertTrue(A == B);
}
In general "==" compares the addresses while .equals() will compare using the object equals which depends on the objects (comparing to File object is different than comparing to Integers).
EDIT:
My bad, this is actually wrong,
== and equals are actually the same in java as seen there:
equals vs Arrays.equals in Java
In case of arrays, it is indeed the same, and quite confusing I must say.
I modified my test to show the difference.