home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-08-28 | 525 b | 17 lines |
- // Copyright(c) 1996 ObjectSpace, Inc.
- import jgl.*;
-
- public class Functions7
- {
- public static void main( String[] args )
- {
- Array array = new Array();
- array.add( "ape" );
- array.add( "giraffe" );
- array.add( "lizard" );
- BinaryPredicate comparator = new BinaryComposePredicate( new GreaterInteger(), new LengthString(), new LengthString() );
- System.out.println( "before = " + array );
- Sorting.sort( array, comparator );
- System.out.println( "after = " + array );
- }
- }