Java Vector iterator() MethodThe iterator() method of Java Vector class is used to get an iterator over the elements in this list in proper sequence. SyntaxFollowing is the declaration of an iterator() method: ParameterThis method does not accept any parameter. ReturnThe iterator() method returns an iterator over the elements in this list in proper sequence. ExceptionsNA Compatibility VersionJava 1.2 and above Example 1Test it NowOutput: Red Green Blue Pink Example 2Test it NowOutput: 100 200 300 400
Next TopicJava Vector
|