A

Admin • 833.24K Points
Coach

Q. What is the significance of using instanceOf operator and getClass() in equals method?

  • (A) InstanceOf can return true for comparing current class with its subclass as well
  • (B) getClass() can return true only if exactly same class is compared
  • (C) getClass() can return false when compared with subclass
  • (D) All of the above
  • Correct Answer - Option(D)
  • Views: 26
  • Filed under category Java
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.