Java Collections – HashMap and HashSet

HashMap and HashSet are collections in Java which are most commonly used. Here we summarise key features: HashMap   HashSet Duplicates Yes, Duplicate values but  no duplicate keys No Adding or Storing mechanism Hashing technique HashMap object Dummy values No Yes Implements Map Set Number Of Objects required during add operation 2 1 When to…