nerdexam
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

1Z0-804 question #145 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)
  • A
    3% (1)
  • B
    5% (2)
  • C
    3% (1)
  • D
    76% (29)
  • E
    13% (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.

Full 1Z0-804 Practice