home *** CD-ROM | disk | FTP | other *** search
Java Source | 1997-07-30 | 504 b | 16 lines |
- // Copyright(c) 1997 ObjectSpace, Inc.
- import COM.objectspace.jgl.*;
-
- public class Functions8
- {
- public static void main( String[] args )
- {
- double array[] = { 3, 1, 5, -2, 7, 9 };
- DoubleArray doubleArray = new DoubleArray( array );
- BinaryPredicate comparator = new LessNumber( new Double( 0 ).getClass() );
- System.out.println( "unsorted = " + doubleArray );
- Sorting.sort( doubleArray, comparator );
- System.out.println( "sorted = " + doubleArray );
- }
- }
-