title: Buffered reader not accessable by other methods
body: <p>Sorry if this is obvious, I am inexperienced with Java. I have 2 methods, one that creates a BufferedReader, and one that processes it. However, the processing method can not access the BufferedReader, even though it is in a public method. Am I doing something wrong?</p>
  
  <pre><code>package textfiles;
  import java.io.IOException;
  import java.io.FileReader;
  import java.io.BufferedReader;
  
  public class ReadFile {
  
      private String path;
  
      public ReadFile(String filePath) {
          path = filePath;
      }
  
      public void Open() throws IOException {
      FileReader read = new FileReader(path);
      BufferedReader buff = new BufferedReader(read);
      }
  
      public String[] OpenFile() throws IOException {
  
  
  
          int numberOfLines = readLines();
          String[] textData = new String[numberOfLines];
  
          int i;
  
          for (i=0; i &lt; numberOfLines; i++) {
          textData[i] = buff.readLine();
  
          }
  
          buff.close();
          return textData;
      }
  
      int readLines() throws IOException {
  
          FileReader linedFile = new FileReader(path);
          BufferedReader  findLines = new BufferedReader(linedFile);
  
          String lines;
          int noLines = 0;
  
          while ((lines = findLines.readLine()) != null) {
              noLines++;
          }
  
          findLines.close();
          return noLines;
      }
  
  }
  </code></pre>