home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1998 October A
/
Pcwk10a98.iso
/
Inprise
/
TRIAL
/
JBUILDER
/
JSAMPLES.Z
/
Sorting2.java
< prev
next >
Wrap
Text File
|
1998-05-08
|
688b
|
26 lines
// Copyright(c) 1996,1997 ObjectSpace, Inc.
import com.objectspace.jgl.adapters.*;
import com.objectspace.jgl.algorithms.*;
import java.util.Vector;
/**
* Sorting a primitive array without iterators.
*
* @see com.objectspace.jgl.algorithms.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 );
}
}