You could loop through the arrays. Something like:
int[] array1 =new int[] {1,2,3,4};
int[] array2 = new int[] {0,5,3,3};
int numberOfEqualElements = 0;
for (int i=0; i<array1.length; i++) {
if (array1[i] == (array2[i])) {
numberOfEqualElements += 1;
}
}
system.out.println("The number of elements that are equal is " + numberOfEqualElements);
Then you would know that the number that are not equal is whatever is left.