Intermediate
Object-Oriented Programming Concepts
Q68 / 100
What is the difference between an interface and an abstract class (in languages that support both)?
Correct! Well done.
Incorrect.
The correct answer is B) An interface typically defines only method signatures (a pure contract), while an abstract class can provide partial implementation and state
B
Correct Answer
An interface typically defines only method signatures (a pure contract), while an abstract class can provide partial implementation and state
Explanation
Interfaces declare a contract without shared implementation (in classic form), while abstract classes can mix abstract and concrete methods plus shared fields.
Progress
68/100