// from http://jerry.cs.uiuc.edu/~plop/plop99/proceedings/sandu/sandu.pdf import java.util.Vector; import java.util.Comparator; import java.util.Collections; class Main { static public void main( String[] args ){ Vector collection = new Vector(); collection.add(new Integer(4)); collection.add(new Integer(2)); collection.add(new Integer(1)); collection.add(new Integer(3)); Comparator comparator = new Comparator() { public int compare(Object source, Object target) { int sourceInt = ((Integer)source).intValue(); int targetInt = ((Integer)target).intValue(); return(sourceInt