// Copyright(c) 1996,1997 ObjectSpace, Inc.

import COM.objectspace.jgl.*;

/**
 * Using a Vector as the underlying Sequence.
 *
 * @see COM.objectspace.jgl.Stack
 * @version 2.0.2
 * @author ObjectSpace, Inc.
 */

public class Stack2
  {
  public static void main( String[] args )
    {
    // Use a Array as the underlying data structure.
    Stack stack = new Stack( new Array() );
    stack.push( "bat" );
    stack.push( "cat" );
    stack.push( "dog" );

    System.out.println( "Print the Stack." );
    System.out.println( stack );
    }
  }
