Challenge for Writing Generic Classes and Methods
Create a generic class
Stack<T> that can be used to represent stacks of objects of type T. The class should include methods
isEmpty(). Inside the class, use an ArrayList to hold the items on the stack.
The included boilerplate will
push each number from input onto the the stack, but will
pop() and print off an item when it reaches a -1.
Alternatively, you can try out Learneroo before signing up.