StackNameStackSynopsis
DescriptionStack represents a last-in-first-out (LIFO) object stack. The push() method places an object on the top of the stack, while the pop() method retrieves the top object from the stack. The peek() method returns the top object without removing it from the stack. Class Summary
public class java.util.Stack extends java.util.Vector { // Instance Methods public boolean empty(); public synchronized Object peek(); public synchronized Object pop(); public Object push(Object item); public synchronized int search(Object o); } Instance Methodsemptypublic boolean empty()
peekpublic Object peek()
poppublic Object pop()
pushpublic Object push(Object item)
searchpublic synchronized int search(Object o)
Inherited Variables
Inherited Methods
See AlsoEmptyStackException, Vector |
|