Declare Variables Inside or Outside a Loop

Posted on 23rd August 2006 by Nio in 程序人生

Declare Variables Inside or Outside a Loop

The question of readability is more religious but does have a little to do with performance. The question about memory and performance goes hand in hand and can be shown definitively. I am going to go through both questions and show the difference from the byte code level using javap. I am not a byte code expert but I will do my best to explain the code properly. If there is an error in my explanation please let me know.

No Comments »

No comments yet.

Leave a comment