home *** CD-ROM | disk | FTP | other *** search
/ ActiveX Programming Unleashed CD / AXU.iso / jgl_1_1 / jgl_1_1.exe / examples / Iterators7.java < prev    next >
Encoding:
Java Source  |  1996-07-15  |  491 b   |  19 lines

  1. // Copyright(c) 1996 ObjectSpace, Inc.
  2. import jgl.*;
  3.  
  4. public class Iterators7
  5.   {
  6.   public static void main( String[] args )
  7.     {
  8.     Array array = new Array();
  9.     array.add( "ape" );
  10.     array.add( "bat" );
  11.     array.add( "cat" );
  12.     array.add( "dog" );
  13.     System.out.println( "array = " + array );
  14.  
  15.     ReverseIterator iterator = new ReverseIterator( array.end() );
  16.     while( iterator.hasMoreElements() )
  17.       System.out.println( iterator.nextElement() );
  18.     }
  19.   }