Difference between abstract class and interface
Answer Posted / mkm
)1. Accessibility modifier(Public/Private/internal) is
allowed for abstract class.
Interface doesn't allow accessibility modifier
2. class can inherit only one abstract class
class can implement more than one interface.
(2) An abstract class can contain fields,
constructors, or destructors and implement properties. An
interface can not contain fields, constructors, or
destructors and it has only the property's signature but no
implementation.
(3) An abstract class cannot support multiple
inheritance, but an interface can support multiple
inheritance. Thus a class may inherit several interfaces
but only one abstract class.
• Interface is used to "implements"; whereas abstract class
is used to "extends".
• Interface can be used to achieve multiple inheritance;
abstract class can be used as a single inheritance.
Is This Answer Correct ? | 13 Yes | 2 No |
Post New Answer View All Answers
What is difference between cache and session?
What are ASP.NET Web Forms? How is this technology different than what is available though ASP?
How response object is related to asp's response object?
What are sessions in asp net?
Explain why datareader is useful?
What are different types of authentication techniques that are used in connection strings to connect .net applications with microsoft sql server?
How do you remove duplicates without using remove duplicate stage?
What are the types of validation in asp net?
What is the difference between system.stringbuilder and system.string
How do you change the session time-out value?
Explain the boxing and unboxing concept in .net?
How to improve performance of web application asp.net mvc? : Asp.Net MVC
Can you explain one critical mapping? Performance issue which one is better?
What do you understand by aggregate dependency?
Do you know caching feature?