public interface Stack<E>
Modifier and Type | Method and Description |
---|---|
boolean |
isEmpty()
Tests whether the stack is empty.
|
E |
pop()
Removes and returns the top element from the stack.
|
void |
push(E e)
Inserts an element at the top of the stack.
|
int |
size()
Returns the number of elements in the stack.
|
E |
top()
Returns, but does not remove, the element at the top of the stack.
|
int size()
boolean isEmpty()
void push(E e)
e
- the element to be insertedE top()
E pop()