public synchronized Object remove(int index){
  modCount++;
  if (index >= elementCount)   throw new ArrayIndexOutOfBoundsException(index);
  Object oldValue=elementData[index];
  int numMoved=elementCount - index - 1;
  if (numMoved > 0)   System.arraycopy(elementData,index + 1,elementData,index,numMoved);
  elementData[--elementCount]=null;
  return oldValue;
}

public synchronized Object remove ( int index ) { modCount ++ ; if ( index >= elementCount ) throw new ArrayIndexOutOfBoundsException ( index ) ; Object oldValue = elementData [ index ] ; int numMoved = elementCount - index - 1 ; if ( numMoved > 0 ) System . arraycopy ( elementData , index + 1 , elementData , index , numMoved ) ; elementData [ -- elementCount ] = null ; return oldValue ; }
removes the element at the specified position in this vector . shifts any subsequent elements to the left ( subtracts one from their indices ) . returns the element that was removed from the vector .
