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…
Question
Given:
Which statement is true?
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)- A4% (2)
- B6% (3)
- C75% (36)
- D15% (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
Community Discussion
No community discussion yet for this question.
