我们可以在 hashcode() 中使用随机数字吗?

不行因为对象的 hashcode 值必须是相同的参见答案获取更多关于 Java  

重写 hashCode() 方法的知识

原文地址:https://www.cnblogs.com/programb/p/13018929.html