Yes google knows about it but i cant find any simple example which clarify the difference to person like me(who is not very claver in programming).
kindly give me any simple example which shows such a functionality, which is only possible by abstract class and not possible by interface or vise-versa.
thanks.
Inam ur Rehman.
You have to start thinking in types; everything is a type. An instance of a type
can do things, possbily given instances of (other) types. A interface is a type
and an (abstract) class is a type plus an implementation of the things it can do.
If a class implements everything an interface said it can do, the class is a
concrete class; otherwise it must be abstract. Interfaces (which are pure types)
are also called 'contracts'. For a class, in order to obey that contract it must
implement everything the interface 'promises' that it can do.
If/when you start coding, remember this 'mantra':
Code to the interface (type), not the implementation (class).
kind regards,
Jos