for each loop in java

Let’s learn for-each loop in java. For-each loop in java For-each loop traverses each element of an array sequentially without using index or counter. for-each loop or enhanced for loop was introduced in Java 1.5 version. Here’s the syntax and example on for each loop. Syntax: for(<DataType of array><variablename> : <Array to be iterated>) {…

Read More For-each loop in java