parsing file with scanner...
guys, how could I parse a file that contains answers and questions in the form of:
Which of the following types are supertypes of Rectangle?
Select all that apply:
my intent is to separate the question from the answer and put them both in an array that takes in question, answers, but I'm used to work with BufferedReader instead of Scanner which is the case here.... this is what I have so far, but is not doing the job
public void read(Scanner in) throws IOException
String answers = "answer:";
q = in.nextLine();//getting the question
a = in.next();//getting the answer
addQuestion(new Question(q, a));