Question OOP-POLY-0071
HardIn Java, which method is called by obj.equals(x) when obj is declared as Object but is really a String?
- A.
String.equals
- B.
Neither
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Polymorphism question
In Java, which method is called by obj.equals(x) when obj is declared as Object but is really a String?
String.equals
Neither
Sign up free to see the answer and a step-by-step explanation.
It depends on x
Object.equals