Solved

When You Implement Equals in a Subclass, You Should First

Question 83

Multiple Choice

When you implement equals in a subclass, you should first call equals in the superclass.Why?


A) To ensure that the superclass constructor has already executed.
B) To check whether the objects being compared are instances of the same class.
C) To prevent a bad cast and the possibility of an exception.
D) To check whether the superclass instance variables match.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents