title: Which loop has better performance? Why?
body: <pre><code>String s = "";
  for(i=0;i&lt;....){
      s = some Assignment;
  }
  </code></pre>
  
  <p>or</p>
  
  <pre><code>for(i=0;i&lt;..){
      String s = some Assignment;
  }
  </code></pre>
  
  <p>I don't need to use 's' outside the loop ever again. 
  The first option is perhaps better since a new String is not initialized each time. The second however would result in the scope of the variable being limited to the loop itself.</p>
  
  <p>EDIT: In response to Milhous's answer. It'd be pointless to assign the String to a constant within a loop wouldn't it? No, here 'some Assignment' means a changing value got from the list being iterated through.</p>
  
  <p>Also, the question isn't because I'm worried about memory management. Just want to know which is better.</p>