home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
inprise
/
JSAMPLES.Z
/
SList4.java
< prev
next >
Wrap
Text File
|
1998-05-08
|
728b
|
39 lines
// Copyright(c) 1996,1997 ObjectSpace, Inc.
import com.objectspace.jgl.*;
/**
* Exceptions.
*
* @see com.objectspace.jgl.SList
* @version 3.0.0
* @author ObjectSpace, Inc.
*/
public class SList4
{
public static void main( String[] args )
{
SList list = new SList();
try
{
list.popBack();
}
catch ( InvalidOperationException exception )
{
System.out.println( "Caught " + exception );
}
list.add( "ape" );
list.add( "bat" );
list.add( "cat" );
try
{
list.at( 5 );
}
catch ( IndexOutOfBoundsException exception )
{
System.out.println( "Caught " + exception );
}
}
}