home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
inprise
/
JSAMPLES.Z
/
Array3.java
< prev
next >
Wrap
Text File
|
1998-05-08
|
784b
|
33 lines
// Copyright(c) 1996,1997 ObjectSpace, Inc.
import com.objectspace.jgl.*;
/**
* Insertion.
*
* @see com.objectspace.jgl.Array
* @version 3.0.0
* @author ObjectSpace, Inc.
*/
public class Array3
{
public static void main( String[] args )
{
Array array = new Array();
array.add( "bat" );
array.add( "cat" );
array.add( "dog" );
System.out.println( "array = " + array );
System.out.println();
array.insert( array.begin(), "ape" );
System.out.println( "After insert at begin = " + array );
array.insert( array.end(), "emu" );
System.out.println( "After insert at end = " + array );
array.insert( 3, 2, "fox" );
System.out.println( "After array.insert( 3, 2, fox ) = " + array );
}
}