// 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 );