I've got a class running on a Android wearable which and there is supposed to be only one instance of it, however I'm very occasionally observing some unexpected behavior which is leading me to speculate if under some circumstances perhaps two instances are being created.
If I was in the C or C++ world I would just add logging statements to the class's methods to log the object's memory address of itself and it would be straightforward to check if there are actually two objects or just one.
What's a Java/Android equivalent way of being able to identify a particular object instance?