Enhanced For Loop in Java

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

Get our latest blog posts delivered to your inbox

Subscribe and get popular blog posts about software testing industry.


Leave a Comment

Share via
Copy link
Powered by Social Snap