Java Foreach Loop
Java 5 introduced foreach loop, a much needed feature since it was first relaeased. Java foreach loop provides code simplicity, readability and eliminates the repetition of code that we write for type casting and assignments, when we are iterating arrays and collection objects.
When used with generics nothing is more apealing loop than foreach. I was reading an article “What Java foreach loop can do?“, which describes every thing a developer needs to know about for eachloop.