Jan 30
Java 5 introduced what is sometimes called a “for each” statement that accesses each successive element of an array, List, or Set without the bookkeeping associated with iterators or indexing.
String[] names = {"Michael Maus", "Mini Maus"};
for (String s : names) {
System.out.println(s);
}
the output results
Michael Maus
Mini Maus
