Unit 2 Collection
Unit 2 Collection
ListIterator<String> li = names.listIterator();
while (li.hasNext())
System.out.println(li.next());
addAll(Collection C) It is used to append all of the elements in the specified collection to the end of this
Vector.
addElement(Object O) It is used to append the specified component to the end of this vector. It increases
the vector size by one.
capacity() It is used to get the current capacity of this vector.
containsAll(Collection C) It returns true if the vector contains all of the elements in the specified collection.
copyInto(Object[] arr) It is used to copy the components of the vector into the specified array.