Difference between HashMap and IndentityHashMap

It is exactly same as HashMap except the below difference. HashMap uses equals() method to indentify duplicate keys for object’s content comparision. IndentityHashMap uses ‘==’ operator to identify duplicate keys. Example :  In this example we are creating HashMap and IndentityHashMap objects and inserting integer values.  

 Output:

HashMap uses equals method for […]