java.util.Stack (JDK 1.0)
This class implements a last-in-first-out stack of objects. push() puts an object on the top of the stack. pop() removes and returns the top object from the stack. peek() returns the top object without removing it.
public classStackextends Vector { //Default Constructor: public Stack()//Public Instance Methodspublic booleanempty(); public synchronized Objectpeek(); public synchronized Objectpop(); public Objectpush(Objectitem); public synchronized intsearch(Objecto); }
Hierarchy:
Object->Vector(Cloneable, Serializable)->Stack