Please note. This question is not an abstract class vs interface kind of question.
Yes. I know. It's not necessary for a class which extends an abstract class to override all of its unimplemented methods. If a child class is not giving definition to some of its parent's unimplemented methods, then child class will be also considered to be abstract.
But a class which implements an interface should implement all of its methods ( Also Multiple inheritance is possible with interfaces).
Is this the only difference between an abstract class with only abstract methods and an interface?
yes, I understand. An Abstract class can have states and method implementations. But I'm making the question very clear. Its not actually a interface vs abstract class kind of question.
Here, in the question, the abstract class is not having any data members or any method implementations. Just some abstract methods only. eg:
abstract class shape{
abstract void draw();
}
I just want to know whether there are any other differences. What should I use in such a scenario?
Please help.