Source of 6.10.java


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