home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
inprise
/
JSAMPLES.Z
/
Queue2.java
< prev
next >
Wrap
Text File
|
1998-05-08
|
567b
|
26 lines
// Copyright(c) 1996,1997 ObjectSpace, Inc.
import com.objectspace.jgl.*;
/**
* Use of List as underlying Sequence.
*
* @see com.objectspace.jgl.Queue
* @version 3.0.0
* @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 );
}
}