![]() |
VOOZH | about |
The Java.util.Vector.addElement() method is used to append a specified element to the end of this vector by increasing the size of the vector by 1. The functionality of this method is similar to that of the add() method of Vector class.
Syntax:
boolean addElement(Object element)
Below programs illustrate the working of java.util.Vector.add(Object element) method.
Example 1 :
The vector is : [Geeks, for, Geeks] The new Vector is : [Geeks, for, Geeks, Last, Element]
Example 2:
The vector is : [1, 2, 3] The new vector is : [1, 2, 3, 50, 100]