// not as useful as closures, not even 'close'... Max max = new Max(){ boolean compare(Object a,Object b){ ... } }; while(...){ .... } #### class Whatever implements Comparable { // used by generic sort (or max) routines public int compareTo(Object o){....} }