code: public E pop() {
      E obj;
      int len = size();
      obj = peek();
      remove(len - 1);
      return obj;
    }
docs: Removes the object at the top of this stack and returns that object as the
  value of this function.
  
  @return The object at the top of this stack (the last item of the
  <tt>ArrayList</tt> object).
  @exception EmptyStackException if this stack is empty.