title: Unable to Read Text File in Java using FileReader and BufferedReader, possible reasons?
body: <p>Here From the <code>start()</code> method i called the <code>loadMap(filename)</code> method with a <code>text file</code>.But i don't know why though the loadMap() is called but the <code>FileReader</code> and <code>BufferedReader</code> doesn't working. and the text commented below this two File reader's Statement 
  <code>System.out.print("INside loadMap()");</code> doesn't printing in the console and the text File isn't reading. What's the problem here occur actually? Help someone please.</p>
  
  <pre><code>import java.io.BufferedReader;
  import java.io.FileReader;
  import java.io.IOException;
  import java.util.ArrayList;
  
  public class DemoClass {
      public static void main(String[] args) {
          start();
      }
  
      public static void start() {
          try {
              System.out.print("Pobon File Inside");
              loadMap("data\\map1.txt");
  
          } catch (Exception e) {
              // TODO: handle exception
          }
      }
  
      private static void loadMap(String filename) throws IOException {
          ArrayList lines = new ArrayList();
  
          FileReader fReader = new FileReader(filename);
          BufferedReader reader = new BufferedReader(fReader);
          System.out.print("INside loadMap()");
  
          while (true) {
              String line = reader.readLine();
              if (line == null) {
                  reader.close();
                  break;
              }
              if (!line.startsWith("!")) {
                  lines.add(line);
              }
          }
          System.out.print("INside loadMap()");
      }
  }
  </code></pre>