title: Java splitting read lines into strings and then using them
body: <p>so i have the code</p>
  
  <pre><code>public void reply(){
      String fileName = "readLog.txt";
      String line = null;
      try {
          FileReader fileReader = 
              new FileReader(fileName);
  
          BufferedReader bufferedReader = 
              new BufferedReader(fileReader);
  
          while((line = bufferedReader.readLine()) != null) {
              Output.append(line);//output is name of textarea
          }   
          bufferedReader.close();         
      }
      catch(FileNotFoundException ex) {
          System.out.println(
              "Unable to open file '" + 
              fileName + "'");                
      }
      catch(IOException ex) {
          System.out.println(
              "Error reading file '" 
              + fileName + "'");                  
      }                   
      }
  </code></pre>
  
  <p>and it reads out what is in the text file fine but I want it to read
  say line 1, and in line 1 I would have something like:</p>
  
  <blockquote>
    <p>A Question        -          A answer</p>
  </blockquote>
  
  <p>and I want it so It can place the lines in the correct places e.g</p>
  
  <blockquote>
    <p>if("Input" == "A Question") { somethinghappends(); }</p>
  </blockquote>
  
  <p>I know thats not how you would set out a if statment with strings it is just an example.</p>
  
  <p>how would I go about doing this? (ive looked around the internet and haven't found much of use)</p>