Originally posted by ankana mukherjee: this from page no=526(k&B)
in the overriden equals method how can o instanceof Moof be true? is it because two is instanceof Moof?
Right, here temporary object 'o' , holds the reference of object Moof 'two' , thats mean 'two' is instance of "Moof' . Dont get confused with Generic Object instance to that of Moof object , here 'o' is just a reference , which can hold any Valid Java object !