不行,因为对象的 hashcode 值必须是相同的。参见答案获取更多关于 Java 中
重写 hashCode() 方法的知识。
我们可以在 hashcode() 中使用随机数字吗?
原文:https://www.cnblogs.com/programb/p/13018929.html