1: // @author Frank M. Carrano, Timothy M. Henry 2: // @version 5.0 3: public T peek() 4: { 5: if (isEmpty()) 6: throw new EmptyStackException(); 7: else 8: return topNode.getData(); 9: } // end peek