home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-09-10 | 538 b | 28 lines |
- // Copyright(c) 1996 ObjectSpace, Inc.
-
- import jgl.*;
-
- /**
- * Use of List as underlying Sequence.
- * <p>
- * @see jgl.Queue
- * @version 1.1
- * @author ObjectSpace, Inc.
- */
-
- public class Queue2
- {
- public static void main( String[] args )
- {
- // Use a DList as the underlying data structure.
- Queue queue = new Queue( new DList() );
- queue.push( "bat" );
- queue.push( "cat" );
- queue.push( "dog" );
-
- System.out.println( "Print the queue." );
- System.out.println( queue );
- }
- }
-
-