hey, you bytecode native speakers 
Can you tell me, if the following two code fragments produce different byte code and especially execute in different performance?
code1
MyClass c = null;
for ( int i = 0; i < myList1.size(); i++ )
{
c = myList1.get( i );
c.doSomething();
}
for ( int i = 0; i < myList2.size(); i++ )
{
c = myList2.get( i );
c.doSomething();
}
code2
for ( int i = 0; i < myList1.size(); i++ )
{
MyClass c = myList1.get( i );
c.doSomething();
}
for ( int i = 0; i < myList2.size(); i++ )
{
MyClass c = myList2.get( i );
c.doSomething();
}
I do like the second variant better. But is it slower because of the in-place declaration of the variable c inside of the loops? I would expact modern compilers to eliminate a possible disadvantage. But I don’t know for sure.
Marvin
