There is a method
removeRange
in AbstractList
class, somehow it is protected
.
So, if you want to remove a range from a Vector, use subList
(which is come from List
) instead:
v.subList( 0, 12 ).clear();The
subList
method returns a view(or a snapshot) instead of a copy to manipulates original container.
So if you want to do any operation in specific range, use subList
.