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
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the above

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
226
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
89%
Success Rate