Home » JAVA Programming » Data Structures » Question
  1. What is the relation between hashset and hashmap?
    1. HashSet is the interface; HashMap is the concrete class
    2. HashMap is the interface; HashSet is the concrete class
    3. HashMap internally implements HashSet
    4. HashSet internally implements HashMap
    5. 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.



Your comments will be displayed only after manual approval.