New course! Every coder should learn Generative AI!
Try a free lesson+ 2
Yes,
Hashmap accepts duplicate values(not keys) while Hashset doesn't accept
In hashmap you can get a value by her key (no key in hashset)
Plus hashmap is faster than hashset