Is it
Object o;
for (...) {
o = new Object();
...
}
really better than
for (...) {
Object o = new Object();
...
}
in terms of performance?
I read this on a computer science book some time ago, but I was wondering how the modern compilers (especially the java compiler) react to this two piece of codes. Are the first form optimized in some way to have the same performances of the second one?