0 votes
in JAVA by
Can we use random numbers in the hashcode() method?

1 Answer

0 votes
by

No, because hashcode of an object should be always same. See the answer to learning more about things to remember while overriding hashCode() method in Java.

...