@@ -0,0 +1,881 @@
+import java.util.ArrayList;%0Aimport java.util.List;%0A%0Apublic class ListExample %7B%0A%0A%09public static void main(String%5B%5D args) %7B%0A%09%09// A generic list for storing Integers, newer syntax%0A%09%09List%3CInteger%3E integers = new ArrayList%3C%3E(4);%0A%09%09integers.add(1);%0A%09%09integers.add(2);%0A%09%09integers.add(3);%0A%09%09integers.add(4);%0A%09%09%0A%09%09System.out.println(integers);%0A%09%09%0A%09%09// A generic list for storing Integers, older syntax%0A%09%09integers = new ArrayList%3CInteger%3E(4);%0A%09%09integers.add(5);%0A%09%09integers.add(6);%0A%09%09integers.add(7);%0A%09%09integers.add(8);%0A%09%09%0A%09%09System.out.println(integers);%0A%09%09%0A%09%09// A list for storing anything.. pre-generic code. Not recommended unless targeting Java 1.4 or older.%0A%09%09// This will trigger various warnings about type safety.%0A%09%09// A VERY BAD IDEA, IN GENERAL.%0A%09%09List oldStyleList = new ArrayList();%0A%09%09oldStyleList.add(%22String%22);%0A%09%09oldStyleList.add(4);%0A%09%09%0A%09%09System.out.println(oldStyleList);%0A%09%7D%0A%7D%0A

Create ListExample.java