I am making a quiz, and storing the questions in a textfile. I managed to call the questions from Java. Now i'm doing the answer part. Which is the best method of storing the answers so that i could then compare them with the answers entered by the user and determine whether the user answered correctly or not? Thanks a lot! :-):)
If you know the number of questions you have you can make up an array to store the user-entered answers.
If not you can use an ArrayList to store the answers.
String answers = new String[numberOfQuestions];
answers[j] = nextLine
List<String> list = new ArrayList<String>();