|
Vector is a class that implements a kind of dynamic array.
Object
Dictionary (abstract)
Hashtable
Properties
Vector
Stack
You can
add instances of any class to it, using methods:
- add(...)
- addElement(...)
- etc...
and then retrieve them using a number of methods:
- elementAt()
- firstElement()
- lastElement()
- toArray()
- etc.
You can remove elements from the Vector
:
- remove()
- removeElementAt()
- removeAll()
- removeRange()
- etc.
and you can replace an element with another element:
You can also obtain the elements stored in a Vector by using an
Enumeration,
returned from the Vector by calling the method:
Note that Vector is being replaced by ArrayList.
(see later).
|