Array, I/O with a .txt file problems

Okay now i have a .txt file thats called questions... and it looks similar to this

5 // 5 is for the number of questions
How many different three-member teams can be formed from six students?
4 // number of answers
20
120
216
720
1 // the answer
0 // the number of times the q was answered
0 // the number of times the q was answered correctly
Which Steeler was named Super Bowl IX MVP?
3
Terry Bradshaw
Lynn Swann
Franco Harris
3
0
0

as you see thats just 2 questions... i need to have each question display one at a time... i have no idea how to put this into an array... here is my code:

first, read the first line / integer. after that you know how many times you have to iterate -> write a loop from 0 to the number of questions and create a question array of that size.
in the loop read the next two lines. store the first in a string (question), the second in an integer. create an array(answers) with the size of that integer.
then you have to write another "nested" loop from 0 to the number of answers/arrays length and read next lines and store them into the array.
read a next line again to get the right answer(rightAnswer)
after that, create a question instance e.g. new Question(question,answers,rightAnswer);
and store it to the first created "question" array.
thats all :)

maybe you should reconsider the file. perhaps xml or json would be better and easier to handle?!

hey thanks i will give it a try.. i have tho created an array of SIZE 5 and sent that to my Question.java class in the getQuestion method... but i just didn't what to do since the integer 5 was the first line of my questions.txt document..how to go through each question.. Here is my Question class: