static int[] numGrade(String[] stuAnswersArr, char[] keyArr, int arraylength) {
int[] numericGrades = new int[arraylength];
int grade=0;
for (int i=0; i<arraylength; i++)
{
for (int j=0; j<10; j++)
{
if (keyArr[j] == stuAnswersArr[i].charAt(j))
{
//The above line is not working for some reason. I did what you said in the comment.
//the problem was that you needed to use () and not []
grade += 10;
}
}
//assigns grade to student and resets grade variable
numericGrades[i]=grade;
grade = 0;
}
return numericGrades;
}