Pregunta de entrevista de ClearScore

How would you implement a stack in Java?