Next:
peek() Method
Up:
Java Stacks
Previous:
push() Method
Contents
pop()
Method
To remove an element from the top of the stack, we use the
pop()
method. For example,