object notation in debugger?

When I trace through a program inside the debugger, I noticed the variable values are shown as something like {java.lang.String@1427}"some string".    What does 1427 mean here?  Thanks.

0
Avatar
Permanently deleted user

That's the value that you'd get from System.identityHashCode for that instance. The portion that appears between the braces is what Object's implementation of toString() produces for that instance.

Randall Schulz

0
Avatar
Permanently deleted user

Great explanation.   Thanks!

0

请先登录再写评论。