title: How to read line by line by using FileReader
body: <p>Thank you for your attention.</p>
  
  <p>I have created a program which I'm using a Login form and Register form. 
  Once users register their email and their password will be saved it into <code>submit.txt</code>. Then they will turn back to login form and enter their email and password which are saved into <code>submit.txt</code>.</p>
  
  <p>In my code, I'm using write file for Register form, and Read file for Login Form. But, it doesn't work. I know my problem in the code used for Read File. May you help me to realize that?.</p>
  
  <p>Thank you too much for your help.</p>
  
  <pre><code> if (checkPassword(usern, hash)) {
      System.out.println("Logged in!");
      ChooseWindow ptb = new ChooseWindow();
      ptb.setVisible(true);
      LoginWindow.this.dispose();
   } else {
      System.out.println("Wrong password");
   }
  
   public boolean checkPassword(String username, String pass) {
      try {
          FileReader inFile = new  FileReader("/users/Ender/Desktop/GetUser/submit.txt");
          BufferedReader inStream = new BufferedReader(inFile);
          String inString;
  
          while ((inString = inStream.readLine()) != null) {}
          inStream.close();                       
      }catch (IOException e) {
          e.printStackTrace();
      }
      return false;
   }
  </code></pre>