public interface Stack<T>
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
empty()
Tests if stack is empty.
|
T |
peek()
Returns item from the top of the stack.
|
T |
pop()
Removes and returns item from the top of the stack.
|
T |
push(T x)
Adds an item to the top of the stack.
|
int |
size()
Returns the size of the stack.
|
T push(T x)
x - the item to add.T pop()
EmptyStackException - if stack is empty.T peek()
EmptyStackException - if stack is empty.boolean empty()
int size()
void clear()
Copyright © 2010 - 2020 Adobe. All Rights Reserved