forLoops - the For-Each Loop
Java 5 introduced the for-each loop, which loops through a collection of values without using an index. Instead, the loop variable repesents each individual value.
The syntax uses a loop variable and a collection of values, separated by a colon character (which can be read as the word "from"). Some things to note:
for (dataType loopVariable : collectionOfSameType) code using loopVariable;
You cannot write into the array using a for-each loop. The looping variable you declare receives a copy of the data in the array, so, if you change its value, you are only changing the local copy.