What is the difference between HashMap and HashSet?

5th Jan 2016, 4:21 PM
Sindhu Manivannan
Sindhu Manivannan - avatar
2 Answers
Find more info here: http://stackoverflow.com/questions/2773824/difference-between-hashset-and-hashmap This is the clearest answer I found there: " HashSet is a set, e.g. {1,2,3,4,5} HashMap is a key -> value (key to value) map, e.g. {a -> 1, b -> 2, c -> 2, d -> 1}"
3rd Apr 2016, 12:23 AM
Patrick White
Patrick White - avatar
hashmap is used to create and search in a map, however hashset is used while storing the keys and values in a map, thats all if you found the answer satisfized please vote up
6th Jul 2016, 2:11 AM
ayoub el khatab
ayoub el khatab - avatar