Faisal A Khan wrote:In the K&B book, Enhanced for loops are said to be new to Java 6.
But this was introduced in Java 5 wasn't it? What was using in Java 5?
Can you please either correct me or explain?
Harshit Sethi wrote:enhanced for loop was introduced in java 6 to specifically iterate over arrays and collections .Before that and even in java 5.0 we used basic for loop .