rt.jar里的Object.java 里的hashCode()就一句:
public native int hashCode();
那hashCode()具体代码在哪呢
------解决方案--------------------
native 表示本地方法,由本地jvm中实现的
object中的hashCode方法实现形式为返回该对象的内存地址
显然new两个Object对象,他们的hashCode是不同的
所以若一个类要用到hashCode的地方都要重写hashCode方法,有很多类你可以去参考
例如String、Integer等类
------解决方案--------------------
windows上或许在某个.dll里面
------解决方案--------------------
不清楚关注中