ClearScore Interview Question

How would you implement a stack in Java?