Java program doesn't add objects to ArrayList

前端 未结 1 1312
醉酒成梦
醉酒成梦 2021-01-26 17:35

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

相关标签:
1条回答
  • 2021-01-26 18:06
    1. 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?

    2. readQuestion() is openning the input file (and thus, probably read the first question over and over again). it is probably the task of readFile()

    3. The first line of the method reads from stdin. You probably meant to read from gameFile scanner?

    0 讨论(0)
提交回复
热议问题