Home > DeveloperSection > Interviews > What is the difference between HashSet and HashMap?

Posted on    May-12-2015 11:50 PM

 Java Java  Collection 
Ratings:
 1 Answer(s)
  378  View(s)
Rate this:

Mayank Tripathi
Mayank Tripathi

Total Post:807

Points:4035
Posted on    May-12-2015 11:50 PM

HashSet contains only values whereas HashMap contains entry(key,value). HashSet can be iterated but HashMap need to convert into Set to be iterated.

Don't want to miss updates? Please click the below button!

Follow MindStick