Java Enhanced For Loop
The enhanced for loop repeatedly executes a block of statements by iterating over an array or collection of elements. Syntax for(declaration : expression) { //Block of Statements } Where: declaration: is used to declare the new variable. expression: is the array or collection object to be iterated. Program to use enhanced for loop example … Read more