public void remove ( int first , int last ) { if ( last < first ) throw new IllegalArgumentException ( "first <= last" ) ; if ( last >= size ) throw new IllegalArgumentException ( "last must be less than the max size" ) ; int delta = last - first + 1 ; for ( int i = last + 1 ; i < size ; i ++ ) { data [ i - delta ] = data [ i ] ; } size -= delta ; }
Removes elements from the list starting at first and ending at last