Difference between abstract class and interface
Answer Posted / venkataramana
A method with method body is called "Concrete method or
Complete method".
A method without method body is called as "Abstract Method".
Abstract Class :
----------------
1.An abstract class is a class which contains 0 or more
abstract methods.
2.An abstract class can have ,
* Instance Variables
* Complete Methods
* Abstract Methods
3.When an abstract class is written, it is the duty of the
programmer to provide sub classes to it.
4.We cannot create an object to abstract class.
5.But we can create a reference to the abstract class.
6.we cannot declare a class as both abstract and final.
Interfaces:
-----------
1.An interface is a specification of method prototypes.
2.An interface contains only "Abstract Methods".
3.An interface contains Constants
4.All the methods of an interface can be "abstract and
final" by default.
5.We cannot create an object to abstract class.
6.But we can create a reference to the abstract class.
7.An interface is written , when the programmer wants to
leave the implementation to the thid party vendors.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Is .net easier than java?
what are constructors and destructors?
What is .net mobile utility controls. : Microsoft dot net mobile
Use of Enable view state ? if turn off what happen ?
Explain the purpose of cache? How is it used? : Dot net architecture
how to change the title of my window?
Explain the types of memory management? : Dot net architecture
Explain the five stages in a dlx pipeline? : Dot net architecture
What's new in the .net 2.0 class library?
what is diffrent beatween localprinter and networkprinter
Explain different pipelining hazards and how are they eliminated? : .NET Architecture
What is the use of web.config?
What is application frame host?
what is the method while we are using adapter and dataset ?
What is a service class?