title: What is the difference between "for(int i=0,length=list.size;i<length;i++) " and "for(int i=0;i<list.size;i++) "?
body: <p>I saw two ways of writing for loops.</p>
  
  <pre><code>for( int i = 0, length = list.size(); i &lt; length; i++ )
  </code></pre>
  
  <p>and </p>
  
  <pre><code>for( int i = 0; i &lt; list.size(); i++ )
  </code></pre>
  
  <p>Is their performance the same? Will the jvm optimize the difference？</p>