title: Reading a .txt file using BufferedReader and FileReader
body: <p>I used BufferedReader and FileReader to read a file but everytime I read it, it just displays no name found. Thanks in advance.</p>
  
  <pre><code>BufferedReader ifile = new BufferedReader (new FileReader ("data.txt"));
      String N;
      while(true)
      {
          N=ifile.readLine();
          if (N == null){
              System.out.print("\fNo name found\n");
              break;
          }
          number = Integer.parseInt(ifile.readLine());
          house = ifile.readLine();
          form = ifile.readLine();
          dob = ifile.readLine();
          System.out.println("Name: " + N + "\nNumber: " + number + "\nHouse: " + house + "\nForm: " + form + "\nDate of Birth: " + dob);
      }
      ifile.close();
  </code></pre>