home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BUG 15
/
BUGCD1998_06.ISO
/
aplic
/
jbuilder
/
jsamples.z
/
Sorting2.java
< prev
next >
Wrap
Text File
|
1997-07-30
|
628b
|
26 lines
// Copyright(c) 1996,1997 ObjectSpace, Inc.
import COM.objectspace.jgl.*;
import java.util.Vector;
/**
* Sorting a primitive array without iterators.
*
* @see COM.objectspace.jgl.Sorting
* @version 1.0
* @author ObjectSpace, Inc.
*/
public class Sorting2
{
public static void main( String[] args )
{
System.out.println( "Sort a primitive array of chars" );
char c[] = { 'c', 'z', 'e', 'f', 'g', 'o', 'a' };
CharArray cArray = new CharArray( c );
System.out.println( "unsorted = " + c );
Sorting.sort( cArray );
System.out.println( "sorted = " + c );
}
}