topjavatutorial.com
Iterating over arrays in Java - Top Java Tutorial
We can iterate over arrays in standard looping constructs like for loop, while loop etc as well as enhanced for-each loop. Here are some examples of iterating over arrays: Example 1: Iterating array using standard for loop Output: 1 2 3 4 5 Example 2: Iterating array in reverse order Output: 5 4 …
TopJavaTutorial