I was browsing over the following code example:
public class GenericTest {
public static void main (String[] args) {
ArrayList myList = ne
Basically, foreach loop is a shortcut for the most common use of an iterator. This is, iterate through all elements. But there are some differences: