title: FileNotFoundException but File present at right path
body: <p>I'm new to programming, every time I try to read a file. I get FileNOtFoundException.</p>
  
  <p>Where could I be going wrong?</p>
  
  <pre><code>import java.io.*;
  import java.util.Scanner;
  
  public class ReadFile 
  {
      public ReadFile()
      {
          readFile();
      }
      public void readFile()
      {
          String filename = "trees.txt";
          System.out.println(new File(".").getAbsolutePath()); //file is at this path.
          String name = "";
          try
          {
              FileReader inputFile = new FileReader(filename);
              Scanner parser = new Scanner(inputFile);
              while (parser.hasNextLine())
              {
                  name = parser.nextLine();
                  System.out.println(name);
              }
              inputFile.close();
          }
          catch (FileNotFoundException exception)
          {
              System.out.println(filename + " not found");
          }
      }
  }
  </code></pre>
  
  <p>Is there any other way I could read the file?</p>