797836 wrote:You can override hashcode() and implement your own, but HashMap adds in a second hash function which I don't think you can override. The end result is a hash which is derived from the output of the hashcode() method and the second internal hash function. My question is, why do you feel the need to override the hashing? Are you seeing collisions?
By default HashMap uses which algorithm to do the hashing as I found from the below link there are so many algorithms available?
Hence which is the default algorithm supported by HashMap and is there any possibility we can use the algorithm on our own
based on the requirement ? Please clarify.
I am not gettiong whiich algorithm it internally usesAnd you're not going to get it here. The people who wrote it aren't reading this,
linear hashing?It isn't documented, not even in the source code. The nearest it gets is saying it uses power-of-two hash tables, which might or might not be linear hashing. Read the source code, as you have already been told.