I studied that "Abstract class means ,it doesn't maintain the complete information about the particular class". Is it right? Justify?

Showing Answers 1 - 2 of 2 Answers

Illur Iqbal

  • Oct 17th, 2005
 

Abstract class must be extended/subclassed (to be useful). It serves as a template. A class that is abstract may not be instantiated (ie, you may not call its constructor), abstract class may contain static data. Any class with an abstract method is automatically abstract itself, and must be declared as such.A class may be declared abstract even if it has no abstract methods. This prevents it from being instantiated. Thanks! Illur Iqbal...New Delhi

 

  Was this answer useful?  Yes

venkatram reddy

  • Oct 25th, 2005
 

Yes. The name abstract itself explains that some this is hidden. The complete implementation may not be done in abstract class. But some thing which you don't want to disclose can be done in an abstract class.

For example. A Car class provides an abstract method start(). Its upto you how you want to start the car engine. But the remaining functionality of a car is same like driving/steering control. So the steering control related methods are hidden from you and by just providing start() method implementation you can have your own kind of car. That is the concept like not "reinventing the whole wheel insted a part of the wheel".

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions