FileDocCategorySizeDatePackage
ArrayListGenericDemo.javaAPI DocExample385Sun Jan 11 11:38:14 GMT 2004None

ArrayListGenericDemo

public class ArrayListGenericDemo extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

		ArrayList<String> data = new ArrayList<String>();
		data.add("hello");
		data.add("goodbye");

		// data.add(new Date()); This won't compile!

		Iterator<String> it = data.iterator();
		while (it.hasNext()) {
			String s = it.next();
			System.out.println(s);
		}