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

  1. // Copyright(c) 1996 ObjectSpace, Inc.
  2. import jgl.*;
  3. import java.util.Enumeration;
  4.  
  5. public class Iterators1
  6.   {
  7.   public static void main( String[] args )
  8.     {
  9.     Array array = new Array();
  10.     array.add( "magical" );
  11.     array.add( "mystery" );
  12.     array.add( "tour" );
  13.     Enumeration iterator = array.elements();
  14.     while( iterator.hasMoreElements() )
  15.       System.out.println( iterator.nextElement() );
  16.     }
  17.   }
  18.  
  19.