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

Posted on    May-12-2015 11:50 PM

 Java Java  Collection 
 1 Answer(s)
  367  View(s)
Rate this:

Mayank Tripathi
Mayank Tripathi

Total Post:807

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