• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Eclipse - where does the (id=nn) come from in the show view variables pane

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am trying to understand the information presented by Eclipse when debugging a Java class.

In the "Variables" panel a variable will be listed, such as "newName". To the right will be something like " "Sue" (id=72) "

I understand "Sue" is the string assigned to the variable newName.

Where does the "72" come from? It seems to be an Object Identifier. Is that correct?

A two part question: How is the id used? By java compiler or JVM? How can a human use such a number?


Important, where can I find such an answer?

I tried the Eclipse Documentation and Google with no success.

Thank you very much,

jim
Lviv, Ukraine
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This should be object Identifier. according to this doc it is used by VM

How you can use this, well depending what you want...
E.g. create a breakpoint using the condition System.identityHashCode(object) == number
 
A teeny tiny vulgar attempt to get you to buy our stuff
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic