public void removeIndex(int n){
  if (n >= size) {
    throw new IndexOutOfBoundsException("n >= size()");
  }
  System.arraycopy(values,n + 1,values,n,size - n - 1);
  size--;
}

public void removeIndex ( int n ) { if ( n >= size ) { throw new IndexOutOfBoundsException ( "n >= size()" ) ; } System . arraycopy ( values , n + 1 , values , n , size - n - 1 ) ; size -- ; }
removes an element at a given index , shifting elements at greater indicies down one .
