Difference between abstract class and interface
Answer Posted / thakur laxmikant
1. Abstract class can have implemented methds
but interface contains only final varibles and
method declaration(signature);
2. In Abstract class there is "IS A " Kind of relationship
between abstract class and its implemented method class
but in interface it can be between any non-relative
classes.
3. Absrtact class can be extended by only one class;
Interface can be implemented by more than one class;
ie. class can inherit only one abstract class
but class can implement more than one interface.
4.A class implementing an interface has to
implement all the methods of the interface,
but the same is
not required in the case of an abstract Class.
5.Access modifiers (protected, abstract, public, etc. )are
useful in abstract Classes but not in interfaces.
| Is This Answer Correct ? | 20 Yes | 7 No |
Post New Answer View All Answers
Is dim fs as filestreamobject is a managed code? : Dot net architecture
Can I create my own permission set?
Explain difference between machine config vs. Web config : Dot net architecture
question related to table havi colspan and row span
Explain dma? : .NET Architecture
how to make and display a form without title bar?
Explain the difference between l1 and l2 cache? : Dot net architecture
Explain how to develop mobile applications using microsoft mobile internet toolkit (mmit) or .net mobile? : Microsoft dot net mobile
What is Opf3
data types used in validation control
Does .NET runtime offer Deterministic Destruction or not?
can u give me real example of how web.config overrides the machine.config file?
Whats new features in Visual Studio 2012?
Use of Enable view state ? if turn off what happen ?
Which software is used for .net programming?