1: // @author Frank M. Carrano, Timothy M. Henry
2: // @version 5.0
3: public T pop()
4: {
5: T top = peek(); // Might throw EmptyStackException
7: // Assertion: topNode != null
8: topNode = topNode.getNextNode();
10: return top;
11: } // end pop