Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

diff betn iterator, enumeration and listIterator

 
Manish Jaju
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is difference between iterator, enumeration and listIterator.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Enumeration" was a lousy name and is found only on the "legacy" collections. "Iterator" is roughly the same thing with a more appropriate name. I'd never looked at ListIterator before, but it extends Iterator (so it "is" an Iterator) and adds backwards movement and a current position concept. Kool.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic