I'm looking for the algorithm of Object.hashCode().
This code is native in Object.java.
Is this because
(a) the code is in assembly--
never was in Java or any other HLL at all
or
(b) it simply isn't disclosed
?
In either case, I am looking to get hold of the algorithm (pseudo-code or some detailed explanation) of "how hashCode() is calculated"-- what are the params going into its calculation and the calculation itself?
Please note: It's the hashCode() of Object i'm looking for--
not another like that of String or hashMap/table.
//==========================================================================
the new Java docs-- jdk 8 now saying
"The value returned by hashCode() is the object's hash code, which is the object's memory address in hexadecimal."
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…