hey guys , I have a problem at this code

char[] student0 = {'A','B','A','C','C','D','E','E','A','D'};
char[] student1 = {'D','B','A','B','C','A','E','E','A','D'};

the program grades the test & displays the result , it compares each array's indexes with the other array's indexes . counts the number of equal values of the indexes & then displays it ....

for instance >> the equal values of the indexes are : B , A , C , E , E , A , D >>> so the count is 6 values .