Question:
what is main purpose of abstract class?
Answer:
if a class contains abstract method,that class must be declared as a abstract class. Abstract methods contains only declarations. it does not contain objects. Source: CoolInterview.com
If a class contains abstract method,that class must be declared as a abstract class. Abstract methods contains only declarations. It does not contain objects.....
Source: CoolInterview.com
Answered by: naveen | Date: 9/10/2009
| Contact naveen
Even if a single method in a class is abstract then the class must be declared with the modifier abstract. Abstract classes allows methods to be implemented in subclasses. Source: CoolInterview.com
Answered by: Ashwin | Date: 9/18/2009
| Contact Ashwin
Abstract classes are class which provides partial implementation,so does't define the complete implementation required for a class,so can't be instantiated and are generic classes also has methods commonly used by its subclasses . Class can be declared as abstract also even though it doesn't have any abstract mathod. But if it has any abstract method , must be declared class as abstract. Source: CoolInterview.com
Answered by: Yathiraja | Date: 12/8/2009
| Contact Yathiraja
Main purpose of abstraact class is to prevent it from getting instantiated. We cannot instantiate a class that is declared abstract. Source: CoolInterview.com
Answered by: Mihir Maniar | Date: 2/3/2010
| Contact Mihir Maniar
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|