title: Close file in finally block doesn't work
body: <pre><code>try {
      FileReader fr = new FileReader(file);
      BufferedReader br = new BufferedReader(fr);
      String line = null;
  } catch (FileNotFoundException fnf) {
      fnf.printStackTrace();
  } finally {
      fr.close();
  }
  </code></pre>
  
  <p>The <code>fr.close()</code> shows an error:</p>
  
  <blockquote>
    <p>fr cannot be resolved</p>
  </blockquote>
  
  <p>I had read that closing a file in the finally block is a good practice.<br>
  What is that am doing wrong?</p>