A stack processes the most recent item first, like a pile of plates, and it is how function calls and undo actually work. Building one on an array shows why push, pop and peek are all O(1) and where overflow and underflow come from. Implement it yourself when a question asks for it, and use ArrayDeque in real code. Avoid the old Stack class in Java, which is synchronized and slower.