public void add(int index,E element){
  rangeCheckForAdd(index);
  ensureCapacity(size + 1);
  System.arraycopy(elementData,index,elementData,index + 1,size - index);
  elementData[index]=element;
  size++;
}

public void add ( int index , E element ) { rangeCheckForAdd ( index ) ; ensureCapacity ( size + 1 ) ; System . arraycopy ( elementData , index , elementData , index + 1 , size - index ) ; elementData [ index ] = element ; size ++ ; }
inserts the specified element at the specified position in this list . shifts the element currently at that position ( if any ) and any subsequent elements to the right ( adds one to their indices ) .
