When class C overrides the equals method it must check that the object reference passes in is not null, that it is the same class (not a requirement, but typical), and that all the instance data is equal – including all superclass instance variables it inherited.