package class5_1_Stacks_021; public class StackDriver { public static void main(String[] args) { System.out.println("StackDriver.main (starting)"); System.out.println("args = [len: " + args.length + "]"); ComposeArrayStack stack; stack = new ComposeArrayStack<>(); stack.push('I'); stack.push(' '); stack.push('s'); stack.push('a'); stack.push('w'); // stack.add(1,'"'); // This error caught by the compiler // stack.add(0,'"'); // This one, too while(!stack.isEmpty()) { // DONE: Pop items and print them as we take them off the stack. System.out.println("stack.pop() = " + stack.pop()); } System.out.println("StackDriver.main (ending)"); } }