code: public synchronized void insertElementAt(E obj, int index) {
          modCount++;
          if (index > elementCount) {
              throw new ArrayIndexOutOfBoundsException(index
                                                       + " > " + elementCount);
          }
          ensureCapacityHelper(elementCount + 1);
          System.arraycopy(elementData, index, elementData, index + 1, elementCount - index);
          elementData[index] = obj;
          elementCount++;
      }
docs: Inserts the specified object as a component in this vector at the
  specified {@code index}. Each component in this vector with
  an index greater or equal to the specified {@code index} is
  shifted upward to have an index one greater than the value it had
  previously.
  
  <p>The index must be a value greater than or equal to {@code 0}
  and less than or equal to the current size of the vector. (If the
  index is equal to the current size of the vector, the new element
  is appended to the Vector.)
  
  <p>This method is identical in functionality to the
  {@link #add(int, Object) add(int, E)}
  method (which is part of the {@link List} interface).  Note that the
  {@code add} method reverses the order of the parameters, to more closely
  match array usage.
  
  @param      obj     the component to insert
  @param      index   where to insert the new component
  @throws ArrayIndexOutOfBoundsException if the index is out of range
  ({@code index < 0 || index > size()})