home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BUG 15
/
BUGCD1998_06.ISO
/
aplic
/
jbuilder
/
jsamples.z
/
Overview8.java
< prev
next >
Wrap
Text File
|
1997-07-30
|
537b
|
18 lines
// Copyright(c) 1996,1997 ObjectSpace, Inc.
import COM.objectspace.jgl.*;
public class Overview8
{
public static void main( String[] args )
{
Array array = new Array();
array.add( new Integer( 3 ) );
array.add( new Integer( -1 ) );
array.add( new Integer( 2 ) );
System.out.println( "Unsorted Array = " + array );
BinaryPredicate predicate = new GreaterNumber();
Sorting.sort( array, predicate ); // Sort in descending order.
System.out.println( "Sorted = " + array );
}
}