FileDocCategorySizeDatePackage
SortCollection.javaAPI DocExample359Sun Feb 29 09:51:24 GMT 2004None

SortCollection

public class SortCollection extends Object
Demonstrate use of Arrays.sort()
version
$id$

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

		List l = new ArrayList();
		l.add("painful");
		l.add("mainly");
		l.add("gaining");
		l.add("raindrops");
		
		Collections.sort(l);
		for (int i=0; i<l.size(); i++)
			System.out.println(l.get(i));