How to use Iterator in HashMap in Java Program

Tutorials Shared by the Internet Community

Advertisements

  Top Tutorials     New Tutorials     Submit     Login     Register  

Tutorial Detail

How to use Iterator in HashMap in Java Program

Iterators in Java are core of Collection package. They provide most important traversing functionality around objects stored in Collections. No matter
http://javarevisited.blogspot.com/2011/10/java-iterator-tutorial-example-list.html
  • Total Hits: 13638

  • Average Rating :
    URL RatingURL RatingURL RatingURL RatingURL Rating

  •  

  • Total Votes: 143 votes

  • Category: JAVA/Collections

  • Submitted on: 2011-11-02 06:28:58

  • Submitted By: Javin Paul

  • Set as Favorite

Description:

Iterators in Java are core of Collection package. They provide most important traversing functionality around objects stored in Collections.
No matter whether your objects are stored inside ArrayList, LinkedList, HashMap, HashSet or Vector , you can effectively use Iterator to navigate inside collection and same time remove objects from Collection safely. There are two kinds of Iterator in Java fail-safe and fail-fast, fail-safe iterator handles failure scenario elegantly while fail-fast iterator throws ConcurrentModification Exception. This article gives a nice overview of Java Iterator and ListIterator and suggest how can you use both iterators based on scenarios and requirement.    More detail...

Rating Detail

 Stars  Percentage  Total Vote
 One star  Vote LeftVote MiddleVote Right 37.76%  54
 Two starsTwo star  Vote LeftVote MiddleVote Right 9.79%  14
 Three starsThree starsThree stars  Vote LeftVote MiddleVote Right 11.89%  17
 Four starsFour starsFour starsFour stars  Vote LeftVote MiddleVote Right 10.49%  15
 Five starsFive starsFive starsFive starsFive stars  Vote LeftVote MiddleVote Right 30.07%  43

Caste Your Vote

 Rating  Selection  Guidelines
 Poor:     Very disappointing, useless.
 Fair:     Below average, disappointing but not useless.
 Good:     About average in its class.
 Very Good:     Above average for its category.
 Excellent:     One of the best Tutorials in its category.






Advertisements