FileDocCategorySizeDatePackage
SortCollection.javaAPI DocExample364Sat Aug 07 20:48:04 BST 1999None

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)

		Vector v = new Vector();
		v.add("painful");
		v.add("mainly");
		v.add("gaining");
		v.add("raindrops");
		
		Collections.sort(v);
		for (int i=0; i<v.size(); i++)
			System.out.println(v.elementAt(i));