T - data to keep in stackpublic class ArrayStack<T> extends Object
| Constructor and Description |
|---|
ArrayStack(int initSize)
Create empty stack
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isEmpty()
Check
|
T |
pop()
Get the head and remove it from the stack
|
void |
push(T obj)
Add the element to the head
|
Copyright © 2018–2022. All rights reserved.