Stacks in Java: A Dive into Push, Pop, and Top