what are the differences between interface and abstract class?
When should I use abstract class and when interface?
Printable View
what are the differences between interface and abstract class?
When should I use abstract class and when interface?
Kinda a hard question to sum up in a few lines but interfaces usually define a "has a" relationship whereas abstract classes define a "is a" relationship. ie A car has a console. A Circle is a Shape.
Thanks
It would be great if you give some examples(codes).