Which is better way to introduce variables in Java/Android?
<p>Does the first example produce more efficient code
than the second in Java/Android and in generally in Java?</p>

<p>At least the first example can not be slower than second,
I think..</p>

<p>I do not care here that the variable v may live longer time in first
example, perhaps eating memory for a longer time.</p>

<p>Of course it is true that second way of doing is more readable
if you have more complicated code with several inner blocks.
Also that is not the issue here.</p>

<pre><code>MyType v;
for(int i=0;i&lt;bigCount;++i)
{
  v = &lt;value produced for i&gt;;
  //do something with v
}


for(int i=0;i&lt;bigCount;++i)
{
  MyType v = &lt;value produced for i&gt;;
  //do something with v
}
</code></pre>
