87.0k views
3 votes
An abstract method that implements an interface has to include definition of all methods in the interface.

A) True
B) False

User Pedro Goes
by
8.6k points

1 Answer

6 votes

Final answer:

False An abstract method that implements an interface does not need to include a definition for all methods in the interface.

Step-by-step explanation:

False An abstract method that implements an interface does not need to include a definition for all methods in the interface. In fact, an abstract class or a concrete subclass of the abstract class that implements the interface can choose which methods to implement and which to leave as abstract.

For example, let's say we have an interface called Shape with two methods: calculateArea() and calculatePerimeter(). An abstract class, such as Rectangle, can implement the calculateArea() method and leave the calculatePerimeter() method undefined. Alternatively, a concrete subclass of Rectangle, such as Square, can implement both methods.

User UnderscoreC
by
8.0k points