Java foreach loop is just a type of loop that is used to iterate through our collection. This loop visit each and every item of that collection.
seen from China

seen from Australia
seen from Malaysia
seen from T1

seen from Hong Kong SAR China
seen from France
seen from United States

seen from China
seen from Canada
seen from United States
seen from Canada
seen from China
seen from United States

seen from Russia
seen from India
seen from United States
seen from China
seen from United States

seen from Canada
seen from Singapore
Java foreach loop is just a type of loop that is used to iterate through our collection. This loop visit each and every item of that collection.
Learn Java Programming - Enhanced For Statement Tutorial
The enhanced for statement (aka for-each loop) is used to iterate through the elements of a collection of objects, such as an array. In this tutorial we are going to build on the knowledge you gained from both the Single Dimensional Array tutorial and the For Loop Statement Tutorial. The nice thing about an enhanced for loop is that you do not need to know the number of elements in the array prior to reading the array. All elements of the array are sequentially read from index 0 through the end of the array. This is how the enhanced for loop is structured: