java - 对象的jvm地址为0是什么意思?

标签 java memory hadoop jvm

我有一个对象 Mutation,我已经对其进行了“新建”。但是当它用 toString() 打印出来时,对象说 Mutation@0。这对我来说似乎不太好。这可能意味着什么?

最佳答案

也就是无符号十六进制表示

As per Docs of toString() method in Object class

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

在哈希码尚未计算的意义上。

Source Code:

   public String toString() {
237        return getClass().getName() + "@" + Integer.toHexString(hashCode());
238    }

关于java - 对象的jvm地址为0是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18592891/

相关文章:

apache - Hive/Hadoop:监视正在运行的进程

java - Spark下载页面上预构建的hadoop和用户提供的hadoop有什么区别?

java - 使用 Java Swing,mouseEntered 的光芒被 mouseMoved 所掩盖。有一个简单的解决办法吗?

java - 将最后一个元素的信息添加到 ArrayList 的末尾

java - 在 Spring Data JPA 存储库中使用 @Primary

memory - 缓存中的命中率和未命中率以及平均时间计算

hadoop - PyArrow 中的 hdfs.connect() 与 HdfsClient

java - 在 OpenGL 中在 3D 形状上平铺子纹理

c++ - 创建图时内存写入异常

C - 强制与 _Alignas 说明符对齐 - 为什么要内存填充?