home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BUG 15
/
BUGCD1998_06.ISO
/
aplic
/
jbuilder
/
jsamples.z
/
Functions8.java
< prev
next >
Wrap
Text File
|
1997-07-30
|
504b
|
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 );
}
}