欢迎访问悦橙教程(wld5.com),关注java教程。悦橙教程  java问答|  每日更新
页面导航 : > > 文章正文

【Java】Java 语言学习笔记,

来源: javaer 分享于  点击 15022 次 点评:223

【Java】Java 语言学习笔记,



想查看类对象的地址,但是toString() 方法又被重载的话,可以考虑下面的函数。

System.identityHashCode()

System.identityHashCode() will get you the 'original' hash code. Uniqueness isn't necessarily guaranteed, note. The Sun JVM implementation will give you a value which is related to the original memory address for this object, but that's an implementation detail and you shouldn't rely on it.


相关文章

    暂无相关文章
相关栏目:

用户点评