Stacks Chapter 5 Overview The stack ADT Exceptional situations Stack implementations stacks in Java What is a Stack? Linear pile of objects of one type one on top of another;…