solve-dot net problems
Wednesday, February 8, 2012
What is the difference between interface and abstract class?
1. Interfaces have only methods prototype but no definition, but abstract class contains method definition also.
2. If a class inherits an interface then it is required to implement all the methods in the class, but if a class inherits an abstract class then only methods which are abstract are required to be implemented.
3. A class can inherit more than one interface, but can’t inherit more than one abstract class.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment