Java Collection iterator() MethodThe iterator() method of Java Collection Interface returns an iterator over the elements in this collection. SyntaxParametersNA ReturnThe iterator () method returns an iterator over the elements in this collection. Example 1Test it NowOutput: 1.Ram 2.Sham 3.Mira 4.Rajesh Example 2Test it NowOutput: 71018 8000 1178 1190 Max number = 71018 Min number = 1178 Example 3Test it NowOutput: Characters : [a ,b ,c ,d ,e ,f ,g ,h ,i ,j ,k ,l ,m ,n ,o ,p ,q ,r ,s ,t ,u ,v ,w ,x ,y ,z ,] Next TopicJava Collection |
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