Name: Roy 2010-07-13 22:17
Getting a NullPointerException for this snippet, specifically at the "if" statement line. I have initialized and giving values to each of the variables, I cannot for the life of me figure out what is wrong.
public boolean gradeQuiz(char[] studentAnswers)
{
int l = 0;
boolean passedQuiz = false;
missedQuestions = new int[ARRAY_SIZE];
for (int i = 0; i < ARRAY_SIZE; i++)
{
if (studentAnswers[i] == correctAnswers[i])
{
l++;
missedQuestions[l] = i + 1;
correct++;
}