title: Reading file with different lines and storing into variables
body: <p>I have some questions regarding reading file inputs with varying lines.  For example, I'm trying to read a file similar to that of a test.  The first line of the file will have the name of the test.  The second line has the question.  The third line contains two integers, the first being responsible for the number of options in a multiple choice question, the second being the correct option. Finally, the next 'x' lines are the potential choices.</p>
  
  <p><em>test file</em></p>
  
  <p>Unit Exam 3<br/>
  "What is the best color for a Mustang?"<br/>
  4,1<br/>
  Red<br/>
  Blue<br/>
  Black<br/>
  White<br/>
  "What year was the Mustang invented?"<br/>
  3,3<br/>
  1978<br/>
  2015<br/>
  1964<br/>
  etc etc</p>
  
  <pre><code> Scanner scnr = new Scanner(new FileInputStream("test.txt"));
      String line;
      while (scnr.hasNextLine()) {
          line = scnr.nextLine();
          String[] data = line.split(",");
  String testTitle = data[0];
  </code></pre>
  
  <p>... This is where my question comes in as the next line is now NOT the test title, however, the location is still data[0] for this line.</p>
  
  <p>Furthermore, the question continues onto the next part because now I'm dealing with the integer line.  I know it would look something like:</p>
  
  <pre><code>int numOptions = Integer.parseInt(data[0]);
  int correct = Integer.parseInt(data[1]);
  </code></pre>
  
  <p>But this would cause a slew of errors for the coding.  Any idea how to do this?  </p>
  
  <p><strong>FINALLY</strong>
  Note that not all questions have the same number of potential options.  How would this change, for example, if there was a question that was True or False with only 2 options, compared to the first question in my sample test that has 4 questions?</p>