home *** CD-ROM | disk | FTP | other *** search
/ ActiveX Programming Unleashed CD / AXU.iso / jgl_1_1 / jgl_1_1.exe / examples / Overview8.java < prev    next >
Encoding:
Java Source  |  1996-07-14  |  519 b   |  19 lines

  1. // Copyright(c) 1996 ObjectSpace, Inc.
  2. import jgl.*;
  3.  
  4. public class Overview8
  5.   {
  6.   public static void main( String[] args )
  7.     {
  8.     Array array = new Array();
  9.     array.add( new Integer( 3 ) );
  10.     array.add( new Integer( -1 ) );
  11.     array.add( new Integer( 2 ) );
  12.     System.out.println( "Unsorted Array = " + array );
  13.     BinaryPredicate predicate = new GreaterInteger();
  14.     Sorting.sort( array, predicate ); // Sort in descending order.
  15.     System.out.println( "Sorted = " + array );
  16.     }
  17.   }
  18.  
  19.