Skip to content
Sharp

Object-oriented programming · interview question

In which scenario would an abstract class be more appropriate than an interface?

Multiple choiceMediumchapter-5-curatedpremiumoopabstract-classes
Choose one answer
Answer and explanation

Correct answer

D. When you need to provide a partial implementation.

Why

An abstract class is suitable when you need to provide some common implementation details that subclasses can use, which is not possible with an interface alone.

Test yourself on Object-oriented programming

A free test with instant, explained results. No account needed.

Start free test
All Object-oriented programming questions →