What is IdentityHashMap?

It is exactly same as HashMap except the following difference.
In the HashMap JVM uses equals() method to identify duplicate keys but in the case of IdentityHashMap JVM uses == operator for this.

No comments:

Post a Comment