title: Can we create hashmap key singleton?
body: <p>I was giving interview one other day and i was speechless when questioning is done on hashmap
  Here are few </p>
  
  <p>Can we make key as singleton?</p>
  
  <p>Can we make key of hashmap mutable or immutable  which one you will choose and why?</p>
  
  <p>For second question i searched through web and found that if we are creating key it should be immutable otherwise data saved on first key and then modified later and if we try to get it again it will give null thus object will be lost.
  Here is the link that i followed for this <a href="https://dzone.com/articles/things-to-keep-in-mind-while-using-custom-classes" rel="nofollow noreferrer">Custom Key Hashmap</a></p>
  
  <p>What about the first question Can we create Hashmap key singleton, according to me if we create key singleton then we lose power of hashmap using same key will replace data if we try to add using singleton key.</p>
  
  <p>Please throw some light on it.</p>