Pergunta de entrevista da empresa iManage

How does a stack in Java work?