Oracle
1Z0-804 · Question #4
Given: What is the result?
The correct answer is C. compilation fails. public String ride() { return "cantering "; } public String ride() { return "tolting "; } if this is given then the result would be: A : tolting cantering tolting
RAC Architecture
Question
Given:
What is the result?
Exhibit
Options
- Atolting cantering tolting
- Bcantering cantering cantering
- Ccompilation fails
- Dan exception is thrown at runtime
How the community answered
(15 responses)- A13% (2)
- B7% (1)
- C73% (11)
- D7% (1)
Explanation
public String ride() { return "cantering "; } public String ride() { return "tolting "; } if this is given then the result would be: A : tolting cantering tolting
Topics
#Java method overriding#inheritance#compilation failure#polymorphism
Community Discussion
No community discussion yet for this question.
