Modifier and Type Method and Description
boolean [**empty**](<https://docs.oracle.com/javase/8/docs/api/java/util/Stack.html#empty-->)()Tests if this stack is empty.
E [**peek**](<https://docs.oracle.com/javase/8/docs/api/java/util/Stack.html#peek-->)()Looks at the object at the top of this stack without removing it from the stack.
E [**pop**](<https://docs.oracle.com/javase/8/docs/api/java/util/Stack.html#pop-->)()Removes the object at the top of this stack and returns that object as the value of this function.
E [**push**](<https://docs.oracle.com/javase/8/docs/api/java/util/Stack.html#push-E->)([**E**](<https://docs.oracle.com/javase/8/docs/api/java/util/Stack.html>) item)Pushes an item onto the top of this stack.
int [**search**](<https://docs.oracle.com/javase/8/docs/api/java/util/Stack.html#search-java.lang.Object->)([**Object**](<https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html>) o)Returns the 1-based position where an object is on this stack.