E - the type of element held by this stackpublic class Stack<E> extends Object
| Constructor and Description |
|---|
Stack()
Create an empty stack.
|
public void push(E element)
element - the element to add to the top of the stackpublic E pop()
public boolean isEmpty()
true if this stack contains no elements.true if this stack contains no elements