Pregunta de entrevista de iManage

How does a stack in Java work?