hashCode()
is a unique code which is generated by the JVM for every object creation.
We use hashCode()
to perform some operation on hashing related algorithm like Hashtable, Hashmap etc..
The advantages of hashCode()
make searching operation easy because when we search for an object that has unique code, it helps to find out that object.
But we can't say hashCode()
is the address of an object. It is a unique code generated by JVM for every object.
That is why nowadays hashing algorithm is the most popular search algorithm.