This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Koti Samadhi wrote:Difference between Abstract Class and Interface, Which scenarios we are using both?
Both expose the concept "Abstraction". Abstract classes are useful when you need to provide a common set of method implementation(s) for all the subclasses to share. Most modern frameworks build around the concept of interfaces.
Purpose of both abstract class and interface is almost the same, except you can use abstract class when some of the implementation is fixed(few methods are implemented) and rest of the implemtation is left to the user.
hi this is simple....
In Interface only abstract and public access specifiers are allowed...
In abstract classes all normal access specifiers are allowed..
abstract classes should not be instantiated..
Use abstract keyword for abstract classes..
Use interface keyword for interfaces..