If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

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?
A) PrintStream
B) Shape
C) RectangularShape
D) Object
E) String
Select all that apply:
answer: BCD

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