home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-08-28 | 438 b | 15 lines |
- // Copyright(c) 1996 ObjectSpace, Inc.
- import jgl.*;
-
- public class Functions4
- {
- public static void main( String[] args )
- {
- int array[] = { 3, 1, 5, -2, 7, 9 };
- IntArray intArray = new IntArray( array );
- BinaryPredicate comparator = new LessInteger();
- System.out.println( "unsorted = " + intArray );
- Sorting.sort( intArray, comparator );
- System.out.println( "sorted = " + intArray );
- }
- }