I\'m trying to add different objects to an ArrayList
and it\'s not working. I\'m not sure if it\'s because I\'m adding objects incorrectly or if there\'s something
readFile()
is looping until qnum and calling readQuestion()
. However, it does not pass the "current" question number to readQuestion()
. so readQuestion()
always starts from the first?
readQuestion()
is openning the input file (and thus, probably read the first question over and over again). it is probably the task of readFile()
The first line of the method reads from stdin. You probably meant to read from gameFile scanner?