Chapter 2: Level Up Your Code Style
← Favor Enums Over Integer Constants
Avoid Collection Modification During Iteration →
Favor For-Each Over For Loops
"Favor For-Each Over For Loops" is one of the 70 comparisons in the book Java by Comparison: Chapter 2: Level Up Your Code Style, pages 24–25.
Like every item in the book, it shows a piece of flawed Java code on one page and the improved version on the next, and explains why the improvement is better.