code: public E remove(int index) {
      RangeCheck(index);
  
      modCount++;
      E oldValue = (E) data[index];
  
      int numMoved = size - index - 1;
      if (numMoved > 0)
        System.arraycopy(data, index + 1, data, index,
            numMoved);
      data[--size] = null; // Let gc do its work
  
      return oldValue;
    }
docs: Removes the element at the specified position in this list.
  Shifts any subsequent elements to the left (subtracts one from their
  indices).
  
  @param index the index of the element to be removed
  @return the element that was removed from the list
  @throws IndexOutOfBoundsException {@inheritDoc}