**DONOTDELETE**
(Unregistered)
05/08/06 01:25 AM
"final" allowed

Surprisingly enough you can use final while declaring your
iteration local variable. Like...
Code:

for(final AType aLoopVar : anArrayOfAType) {
...
}




This shows this new construct is just syntax sugar for:
Code:

for(int _index = 0; _index < anArray.length; _index++ ) {
final AType aLoopVar = anArrayOfAType[_index];
...
}




Contact us JavaWorld

Powered by UBB.threads™ 6.5.5

Featured White Papers


RESEARCH CENTERS: Java Standard Edition | Java Enterprise Edition | Java Micro Edition | Development Tools
About Us | Advertise | Contact Us | Terms of Service/Privacy
Copyright, 2006-2008 Network World, Inc. All rights reserved.