-
What is the relation between hashset and hashmap?
-
- HashSet is the interface; HashMap is the concrete class
- HashMap is the interface; HashSet is the concrete class
- HashMap internally implements HashSet
- HashSet internally implements HashMap
- None of these
Correct Option: D
HashSet is implemented to provide uniqueness feature which is not provided by HashMap. This also reduces code duplication and provides the memory efficient behavior of HashMap.