Mega Code Archive

 
Categories / Java Book / 005 Collection
 

0301 Remove element from a vector

E remove(int index) Removes the element at the specified position in this Vector. boolean remove(Object o) Removes the first occurrence of the specified element in this Vector If the Vector does not contain the element, it is unchanged. boolean removeAll(Collection<?> c) Removes from this Vector all of its elements that are contained in the specified Collection. void removeAllElements() Removes all components from this vector and sets its size to zero. boolean removeElement(Object obj) Removes the first (lowest-indexed) occurrence of the argument from this vector. void removeElementAt(int index) Deletes the component at the specified index.