Enhanced For Loop

In the previous post, we learnt For Loop in Java. In this post we will see Enhanced For Loop. The Enhanced For Loop is designed for iteration through Collections and arrays. This enhanced for loop makes our loops more compact and easy to read.


Let’s see following example with array. Check this link to learn Arrays in Java.

Sample Program:

Must Read: Java Tutorial

Rajkumar SM is a founder of SoftwareTestingMaterial. He is a certified Software Test Engineer by profession and blogger & youtuber by choice. He has an extensive experience in the field of Software Testing. He writes here about Software Testing which includes both Manual and Automation Testing. He loves to be with his wife and cute little kid 'Freedom'.

Leave a Comment

Share via
Copy link
Powered by Social Snap