package com.samovich.java.basics.collections.list.arraylist;

/**
 * Created by Samovich on 1/20/2015.
 */
public class ArrayListForEach {
}

@@ -1,141 +1,936 @@
-package com.samovich.java.basics.collections.list.arraylist;%0A%0A/**%0A * Created by Samovich on 1/20/2015.%0A */%0Apublic class ArrayListForEach %7B
+/**%0A * @file ArrayListForEach.java%0A * @author Valery Samovich%0A * @version 1%0A * @date 2014/01/09%0A */%0A%0A/*%0A *  Following code shows an example how to create a Collection of type List%0A *  which is parameterized with %3CString%3E to indicate to the Java compiler%0A *  that only Strings are allowed in this list.%0A */%0Apackage com.samovich.java.basics.collections.list.arraylist;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Apublic class ArrayListForEach %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A%0A        // Create a list, use is ArrayList as concrete type%0A        // ArrayList%3C%3E infers the String type from the left side%0A        List%3CString%3E myList = new ArrayList%3CString%3E();%0A        %0A        myList.add(%22string1%22);%0A        myList.add(%22string2%22);%0A        myList.add(%22string3%22);%0A%0A        // Loop over it and print the result to the console%0A        for(String value : myList) %7B%0A            System.out.println(value);%0A        %7D%0A    %7D
 %0A%7D%0A

Refactor the code and add the ArrayList with For Statement