可以使用System.identityHashCode()获取对象的哈希码

Java中的System.identityHashCode()方法返回对象的哈希码,这个值通常与对象的内存地址相关,但不是实际地址,只能作为对象身份的标识使用。