gpt4 book ai didi

java - 这个类名在java "1.org.hibernate.tutorial.domain6.TUser@198cb3d "中意味着什么?

转载 作者:行者123 更新时间:2023-12-02 06:03:21 24 4
gpt4 key购买 nike

我注意到这个类有一个@符号。

我知道 $ 符号表示内部类。

那么,@ 是什么意思?

最佳答案

它只是类名和对象哈希码的十六进制表示形式之间的任意分隔符。正在 TUser 对象上调用 toString。来自 docs

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:

 getClass().getName() + '@' + Integer.toHexString(hashCode())

关于java - 这个类名在java "1.org.hibernate.tutorial.domain6.TUser@198cb3d "中意味着什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22493486/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com