[Sarath]: Answers shown is 2.i got these question from actuals Test Um, I doubt that. The actual test doesn't show you the expected answer. And the actual test is unlikely to be as poorly-written as this question seems to be. As John just pointed out, all answers to this question are fundamentally broken. There is no correct answer here. I would add that even if we removed the super.hashCode() from each option, answer 2 would not be a particularly good answer - answers 3 or 4 would be better. Ordinarily I'd say 4 is better since it uses both name and age, both of which are properties of the class. Except that in the real world, age can change over time, so it isn't really a good idea to have this as a fundamental property of the class. Oh well.
Now, if this
had been a question from the actual test, someone probably would have deleted it. They may still do so. I suggest reading the forum's
Position on Real Questions - Must Read!. This is not a good place to ask about real exam questions. Or even badly-misquoted versions of real exam questions.