Nokia interview question

Implement stack using Java