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
Is global asax mandatory?
What are the properties of the eventargs argument when capturing keyboard events?
What is a global postback url?
What are the namespace classes used in asp.net mvc? : asp.net mvc
What would be salary for 8+ years of experience in ASP.NET in different metro city in india?
How do you declare delegates and are delegates and events one and the same and explain how do you declare delegates and invoke them ?
What are ASP.NET Web Forms? How is this technology different than what is available though ASP?
If iam developing an application that must accomodate multiple security levels though secure login and my asp.net web appplication is spanned across three web-servers (using round-robbin load balancing) what would be the best approach to maintain login-in state for the users?
What is the purpose of session management?
What is cross page posting? How is it done?
What is viewstate? In which event of the page life cycle, is the viewstate available?
What is a proxy in web service?
Explain about consistent programming model in the .NET framework?
List the events in page life cycle.
What is the asp.net mvc folder conventions? : asp.net mvc