title: why not correct when using global resource in Try with resource
body: <p>I am using try with resources, and I found if I use the out statement, then I get something wrong</p>
  
  <p>Correct one,</p>
  
  <pre><code>try (FileWriter fstream = new FileWriter(mergedFile, true);) {
   }
  </code></pre>
  
  <p>Incorrect one</p>
  
  <pre><code>FileWriter fstream = null;
  try (fstream = new FileWriter(mergedFile, true);) {
  }
  </code></pre>
  
  <p>I am wondering why I cannot use the second one? The scope of with resources is different?</p>