Abdis -> What you want is af LIFO = Last In First Out.
The basic operators are :
Push (Put On Stack) ...add
Pop (Pull From Stack) ...remove
Peek (Read present item on top of Stack) ... as above, but whitout removing
Search (Search The Stack for element) ...is there such element ?
isEmpty (Stack empty ?) ...test !
What is wrong with Java's present implementation of the datastructure Stack ???
http://java.sun.com/j2se/1.4.2/docs/api/java/util/Stack.html
</MOLOKYLE>