Skip to content
Advertisement

Hashcode value for Map Entry

As per javadocs hashcode for a map.entry is defined as :

JavaScript

Plz confirm, if a bitwise XOR operator is used for calculating the hashcode value for a map entry?

Advertisement

Answer

Yes, it indeed is a bitwise XOR operator. I tried & got the same result for both the hashcode() method & by using ^ operator.

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement