public class Stack_<E> extends java.lang.Object implements Stack<E>, java.io.Serializable
Constructor and Description |
---|
Stack_()
Construct an empty stack.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isEmpty()
Tell whether the stack is empty.
|
E |
peek()
Look at last value without removing it.
|
E |
pop()
Get the last value, removing it from the stack.
|
void |
push(E obj)
Put a new last value onto the stack.
|
java.lang.String |
toString()
Get a String representation of the Stack
|
public boolean isEmpty()
public E peek()
public E pop()
public void push(E obj)
public java.lang.String toString()
toString
in class java.lang.Object