home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
inprise
/
JSAMPLES.Z
/
Container4.java
< prev
next >
Wrap
Text File
|
1998-05-08
|
577b
|
23 lines
// Copyright(c) 1996,1997 ObjectSpace, Inc.
import com.objectspace.jgl.*;
public class Container4
{
public static void main( String[] args )
{
Array array1 = new Array();
array1.add( "ape" );
array1.add( "bat" );
array1.add( "cat" );
Array array2 = new Array();
array2.add( "red" );
array2.add( "blue" );
// Illustrate swapping.
System.out.println( "array1 = " + array1 + ", array2 = " + array2 );
array1.swap( array2 );
System.out.println( "array1 = " + array1 + ", array2 = " + array2 );
}
}