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 .
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 .