home *** CD-ROM | disk | FTP | other *** search
/ ActiveX Programming Unleashed CD / AXU.iso / jgl_1_1 / jgl_1_1.exe / examples / DList4.java < prev    next >
Encoding:
Java Source  |  1996-09-10  |  706 b   |  41 lines

  1. // Copyright(c) 1996 ObjectSpace, Inc.
  2.  
  3. import jgl.*;
  4.  
  5. /**
  6.  * Exceptions. 
  7.  * <p>
  8.  * @see jgl.DList
  9.  * @version 1.1
  10.  * @author ObjectSpace, Inc.
  11.  */
  12.  
  13. public class DList4
  14.   {
  15.   public static void main( String[] args )
  16.     {
  17.     DList dlist = new DList();
  18.     try
  19.       {
  20.       dlist.popBack();
  21.       }
  22.     catch( InvalidOperationException exception )
  23.       {
  24.       System.out.println( "Caught " + exception );
  25.       }
  26.     dlist.add( "ape" );
  27.     dlist.add( "bat" );
  28.     dlist.add( "cat" );
  29.     try
  30.       {
  31.       dlist.at( 5 );
  32.       }
  33.     catch( IndexOutOfBoundsException exception )
  34.       {
  35.       System.out.println( "Caught " + exception );
  36.       }
  37.     
  38.     }
  39.   }
  40.  
  41.