class Stack<E>
extends java.util.AbstractList<E>
implements java.util.RandomAccess
LinkedList can provide the same behavior, it creates many temp objects upon frequent pushes/pops.| Constructor and Description |
|---|
Stack() |
| Modifier and Type | Method and Description |
|---|---|
E |
get(int index) |
E |
peek() |
E |
pop() |
void |
push(E element) |
int |
size() |
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, wait