91
Java Vector iterator() Method
The iterator() method of Java Vector class is used to get an iterator over the elements in this list in proper sequence.
Syntax
Following is the declaration of an iterator() method:
Parameter
This method does not accept any parameter.
Return
The iterator() method returns an iterator over the elements in this list in proper sequence.
Exceptions
NA
Compatibility Version
Java 1.2 and above
Example 1
Output:
Red Green Blue Pink
Example 2
Output:
100 200 300 400
Next TopicJava Vector