Actually, the toString() method in Object does not return an address at all
The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object
(from J2SE 1.4.2 API Specification)
There is a reference in the O'Reilly book "Java in a Nutshell" to a (presumably unique) eight digit hexadecimal ID number as an operand of the jdb print command. However, I could find no reference to this in the Sun Java
doc, let alone a way to find this number from within a Java program. I don't think this could be allowed as it would be hard to enforce security and encapsulation in a program that could directly address fields.
[ April 09, 2004: Message edited by: Mike Gershman ]