Question OOP-POLY-0057
MediumA Java method is overloaded as print(Object o) and print(String s). Which is called by print(null)?
- A.
print(Object o)
- 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
A Java method is overloaded as print(Object o) and print(String s). Which is called by print(null)?
print(Object o)
Neither
Sign up free to see the answer and a step-by-step explanation.
Compilation error always
print(String s), the more specific one