This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
The enhanced for loop will go through the array an set i to each member of the array.
1. On the first iteration, i will be 1, and set arr to 0. 2. On the second iteration, i will be 0 (see step 1), and set arr to 0. 3. On the third iteration, i will be 3, and set arr to 0. 4. On the last iteration, i will be 0 (see step 3), and set arr to 0.