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
Explain some of the disadvantages due to microsoft.net?
Explain about generation?
Whats new features in Visual Studio 2012?
Explain about developer benefit from memory management?
What is the purpose of cache? How is it used? : Dot net architecture
what are constructors and destructors?
Explain the race around condition? : .NET Architecture How can it be overcome? : .NET Architecture
What is the application frame host?
Explain the race around condition? : Dot net architecture
Explain difference between state server and sqlserver? : .NET Architecture
Can you explain server controls in atlas?
What is different about namespace declaration when comparing that to package declaration in java?
What other than biginteger has been introduced in system.numerics namespace?
What is a clickonce application?
What are the important principles of soa (service oriented architecture)?