Oracle
1Z0-804 · Question #145
Given: What is the result of invoking Car's scop method?
The correct answer is D. The implementation of the Car's stop determines the behavior. The Car class is implementing the methods. Methods are not implemented in interfaces.
Advanced Class Design
Question
Given:
What is the result of invoking Car's scop method?
Exhibit
Options
- ABoth vehicles and Motorized's stop methods are invoked.
- BVehicles stop method is invoked.
- CMotorized's stop method is invoked-
- DThe implementation of the Car's stop determines the behavior.
- ECompilation fails.
How the community answered
(38 responses)- A3% (1)
- B5% (2)
- C3% (1)
- D76% (29)
- E13% (5)
Explanation
The Car class is implementing the methods. Methods are not implemented in interfaces.
Topics
#interface default methods#multiple interface inheritance#method resolution#polymorphism
Community Discussion
No community discussion yet for this question.
