What is an abstract class?
April 14th, 2008A class containing atleast one abstract method is called an abstract class. A method that has no implementation and which is expected to be implemented by a subclass is called an abstract method. An Abstract class cannot be instantiated. It is expected to be extended by a subclass. An abstract class may contain static variables declared. Any class with an abstract method must be declared explicitly as abstract. A class may be declared abstract even if it has no abstract methods. This prevents it from being instantiated.



This site is very good and simple. I do have a question here. The first line says – “A class containing atleast one abstract method is called an abstract class” –
Isn’t it incorrect?
However in the last line you have mentioned clearly that abstract class may not have an abstract method.
regards,
prasanth
The abstract class may or may not have the abstract method. But if you have any abstract method then the class should be Abstract.
1. A class containing atleast one abstract method is called an abstract class.
2. A class may be declared abstract even if it has no abstract methods.
?????…