• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Who implements Iterator interface

 
Ranch Hand
Posts: 266
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where is the ITerator interface implemented ?
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Iterator is an interface . you can find the implementation of Iterator in many classes in java.util package; example : AbstractList,HashSet ,...etc
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Seetharaman Venkatasamy wrote:Iterator is an interface . you can find the implementation of Iterator in many classes in java.util package; example : AbstractList,HashSet ,...etc



Hm, sort of.

Jose, questions like these are so easy to find out without waiting on us to answer for you. There seems to be a pattern to your questions with this regard. If you look up Iterator (hit, click it) you will see each class that is known to implement it. Please, in the future, try and put forth some effort of your own. It's not that we don't like answering your questions but I fear you waste a lot of time waiting for us to respond when a simple google search or glance at the API will get you the information you need.
 
Sheriff
Posts: 21997
107
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are also many implementations hidden as private nested classes inside other classes. Most Collection implementation classes have their own Iterator implementation. The thing is, you don't need to know the exact type. Because these classes implement Iterator you know that they have methods hasNext(), next() and remove(), and these are all you need to call.
 
    Bookmark Topic Watch Topic
  • New Topic