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
What are public and private assemblies ?
if there are two application 1 and 2 having a variable x in both app if client1 changes value of x in 1 app client 2 want reads the value of x from 2 app what resultant value will he get
What is the problem with .net generics?
What is .net mobile utility controls. : Microsoft dot net mobile
What is a virtual memory? : Dot net architecture
Explain the difference between state server and sqlserver : Dot net architecture
How do I stop a thread?
Define cache coherency and how is it eliminated? : Dot net architecture
Explain how does .net mobile work? : Microsoft dot net mobile
12. Types of polymorphisem[Run and Design Exp.]
Explain the difference between l1 and l2 cache? : Dot net architecture
Explain difference between machine config vs. Web config : Dot net architecture
Explain
What is the cli? Is it the same as the clr?
What's the difference between an application and a program?