Java – how to get the instance number
•
Java
Is there any way to get the instance number or ID? I mean, you can see it in the eclipse debug > variables window after the class name in the value column
thank you
Solution
See system Identityhashcode, which returns an object that is not overwritten on the object The number that will be returned when hashcode It is not a perfect identity proxy because multiple objects may have the same identity hash code, but it is very useful for debugging
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码