I'm working with a tutorial I found that shows how to use BufferedReader. I've already tried moving my readLines method inside the ending curly brace of my OpenFile method (in an attempt to make the numberOfLines variable not local to only the OpenFile method), but I' still getting red, so I'm back to square one. Here's the code of that class:

BufferedReader textReader = new BufferedReader(fr);
int numberOfLines = readLines();
String[]textData = new String[numberOfLines];//sets up a String array.
//The number of positions in the array (its size) is set to the number
//of lines. We've put this between the square brackets.

/*
* To put all the lines of text from the file into each position in the
* array, we need a loop. The loop will get each line of text and place
* each line into the array:
*/
int i;

for(i=0; i < numberOfLines; i++){

//Access the lines of text and store them in the array:
textData[i] = textReader.readLine();

}
textReader.close();

return textData;

}

//Add a new method called readLines to go through text file and count how
//many lines it has:
int readLines() throws IOException{
//Set up another FileReader, and another BufferedReader:
FileReader file_to_read = new FileReader(path);
BufferedReader bf = new BufferedReader(file_to_read);

//Read each line of text until there are no more lines of text, then
//stop and return a value of null:
while((aLine = bf.readLine()) != null){ ////aLine is underlined red
numberOfLines++;//increment a counter called numberOfLines ////number of lines is underlined red
}
bf.close();
return numberOfLines;
}
}

Why are ////'aLine' and ////'numberOfLines' getting red inside of the readLines method?