home *** CD-ROM | disk | FTP | other *** search
/ ActiveX Programming Unleashed CD / AXU.iso / jgl_1_1 / examples / functions4.java < prev    next >
Encoding:
Java Source  |  1996-08-28  |  438 b   |  15 lines

  1. // Copyright(c) 1996 ObjectSpace, Inc.
  2. import jgl.*;
  3.  
  4. public class Functions4
  5.   {
  6.   public static void main( String[] args )
  7.     {
  8.     int array[] = { 3, 1, 5, -2, 7, 9 };
  9.     IntArray intArray = new IntArray( array );
  10.     BinaryPredicate comparator = new LessInteger();
  11.     System.out.println( "unsorted = " + intArray );
  12.     Sorting.sort( intArray, comparator );
  13.     System.out.println( "sorted = " + intArray );
  14.     }
  15.   }