Next:
search() Method
Up:
Java Stacks
Previous:
pop() Method
Contents
peek()
Method
The
peek()
method returns an object from the top of the stack. For example,
Output