0

While debugging in IntelliI IDEA, we can see:

item = {Object} [224780497]

Is any way to trace/output [224780497] to console?

Makoto
  • 104,088
  • 27
  • 192
  • 230
Sergey Senkov
  • 1,490
  • 1
  • 13
  • 23
  • 2
    Do you mean the hashCode or the object Id as explained here: http://stackoverflow.com/questions/2322903/deciphering-variable-information-while-debugging-java? – maba Apr 26 '13 at 10:45
  • Yes, I need to remember items this way. – Sergey Senkov Apr 26 '13 at 13:16
  • 1
    The value you specified `224780497` is probably the hashCode and not the object id (which is typically 1-5 digits). So you just have to log the hashCode yourself to get it in the console. – maba Apr 26 '13 at 13:20
  • How can I get this hashcode of the Object by myself? – Sergey Senkov Apr 26 '13 at 15:11
  • 1
    Just call `int myHashCode = someObject.hashCode();` – maba Apr 26 '13 at 15:48

0 Answers0