title: Declare an object inside or outside a loop?
body: <p>Is there any performance penalty for the following code snippet?</p>
  
  <pre><code>for (int i=0; i&lt;someValue; i++)
  {
      Object o = someList.get(i);
      o.doSomething;
  }
  </code></pre>
  
  <p>Or does this code actually make more sense?</p>
  
  <pre><code>Object o;
  for (int i=0; i&lt;someValue; i++)
  {
      o = someList.get(i);
      o.doSomething;
  }
  </code></pre>
  
  <p>If in byte code these two are totally equivalent then obviously the first method looks better in terms of style, but I want to make sure this is the case.</p>