title: Using the filename as input for FileReader
body: <p>How do I get a FileReader to read a file using the filename as input, rather than putting a direct filepath to the file? So instead of something like </p>
  
  <pre><code>FileReader fr = new FileReader("C:file");
  </code></pre>
  
  <p>We have something where when we call FileReader(filename), we put the filename in as a parameter. So if I put in the command prompt:</p>
  
  <pre><code>Java FileReader input.txt
  </code></pre>
  
  <p>It will read the text file without me having to have put in new FileReader("C:input.txt"). </p>