Java foreach.
Java 5 got a bit closer to its twin C# by adding the possibility of directly accessing entities of a list or collection through its own “foreach” functionality :
C# :
-
foreach(type var in arr){
-
// implement body
-
}
Java :
-
for (type var : arr) {
-
// implement body
-
}