Can someone please explain the following statements:
"In case where you want to use implementation inheritance then it is usually provided by an abstract base class" - what is implementation/class inheritance ?
"Abstract classes let you define some default behaviour and force subclasses to provide any specific behaviour" - what does behaviour mean here, any example ?
Joined: Dec 17, 2009
"Abstract classes let you define some default behaviour and force subclasses to provide any specific behaviour"
Abstract class can have concrete methods which can provide a default behaviour.
A class marked as abstract can have methods which have the method body (i.e method defintion) .
So if any class extends this abstract class it may or may not override the default behaviour provided by the concrete method in an abstract class.
But an interface is 100% abstract which implies that there are no concrete methods so the class implementing the interface must provide
the behaviour for all the methods spcified in the interface.