Possible Duplicates:
Interface vs Base class
Interface or abstract class?
Hi All,
I am just thinking about the abstract classes and interfaces, I know how they work technically but i don't understand the real use of abstract classes and interfaces. I mean why should we use abstract classes when we know that we can't create it's object, we have to anyway extend this class to use it so why don't we put everything in the derived class.
Same is with interfaces, we have to implement the interface so why don't we put all the methods which are defined in the interface in the class in which we implement the interface.
Can someone please clear my doubts with some examples ?