Java Vector elements() MethodThe elements() method of Java Vector class used to get an enumeration of the elements of the vector which is in use. The returned enumeration object will generate all items in this vector at the same location. Syntax:Following is the declaration of elements() method: Parameter:This method does not accept any parameter. Returns:The elements() method returns an enumeration of the elements of this vector. Exceptions:NA Compatibility Version:Java 1.2 and above Example 1:Test it NowOutput: Data in enumeration object is: Element: 11 Element: 22 Element: 33 Example 2:Test it NowOutput: Data in enumeration object is: White Green Black Pink Next TopicJava Vector |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India