I would like to print the "object reference" of an object in Java for debugging purposes. I.e. to make sure that the object is the same (or different) depending on the situation.
The problem is that the class in question inherits from another class, which has overriden both toString() and hashCode() which would usually give me the id.
Example situation: Running a multi-threaded application, where I (during development) want to check if all the threads use the same instance of a resource object or not.