可能重复: 什么是对象哈希码? hashCode()和identityHashCode()如何在后端工作?
我说的不是字符串类,也不是重写哈希代码的任何其他类。假设我刚刚为Object类创建了一个新对象,那么hashcode()或者在任何情况下都是真,identityHashCode(Object x)会返回该对象的内存地址吗?
Object
hashcode()
identityHashCode(Object x)
https://stackoverflow.com/questions/10917731
相似问题