nerdexam
Oracle

1Z0-804 · Question #132

Given: Which statement is true?

The correct answer is C. SportsCar must implement methods define by convertible. To declare a class that implements an interface, you include an implements clause in the classdeclaration. By convention, the implements clause follows the extends clause, if there is one. Here are the some point that must be considered while implementing an interface (or…

Advanced Class Design

Question

Given:

Which statement is true?

Exhibit

1Z0-804 question #132 exhibit

Options

  • ASportsCar must implement methods from TurboVehicle and steerable
  • BSportsCar must override methods defined by car.
  • CSportsCar must implement methods define by convertible.
  • DInstances of car can invoke convertible methods.

How the community answered

(48 responses)
  • A
    4% (2)
  • B
    6% (3)
  • C
    75% (36)
  • D
    15% (7)

Explanation

To declare a class that implements an interface, you include an implements clause in the classdeclaration. By convention, the implements clause follows the extends clause, if there is one. Here are the some point that must be considered while implementing an interface (or interfaces) into a A class implementing an interface must either implement all the methods of that interface otherwise known asthe abstract class. A class in java may extend at most one superclass because java does not allow multiple inheritance, by it mayimplement more than one interface. Multiple inheritance in java is achieved through the interfaces. When aclass implements more than one interface then implement statement requires a comma- separated list ofinterfaces to be implement by that class.

Topics

#interface#abstract class#inheritance#implements

Community Discussion

No community discussion yet for this question.

Full 1Z0-804 Practice