I ran into this situation today. I have an object which I\'m testing for equality; the Create() method returns a subclass implementation of MyObject.
MyObject
In Java a ==b check if the references of the two objects are equals (rougly, if the two objects are the same object "aliased")
a.equals(b) compare the values represented by the two objects.