First page Back Continue Last page Overview Graphics
Stack (cont)
LIFO stack of objects
Operations
- push(Object) – place something on the top of the stack
- pop():Object – remove the first element of the stack
- peek():Object – look at the first element without removing it
- empty():boolean – check to see if the stack is empty
Notes: