Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 

Wiki Markup
The enhanced for statement is equivalent to a basic for statement of the form:

for (I \#i = Expression.iterator(); \#i.hasNext(); ) [{
    {VariableModifier} TargetType Identifier =
        (TargetType) \#i.next();
    Statement
\}
    
\#i is an automatically generated identifier that is distinct from any other identifiers (automatically generated or otherwise) that are in scope...at the point where the enhanced for statement occurs.

 

...