Mala Gupta wrote:The following is an example of a concrete class:
You can create instances of this class as follows:
However, if you prefix the definition of class Person with the keyword abstract, it will then be termed as an abstract class, as follows:
Now, the following code will not compile:
The compiler will complaint that it cannot create objects of an abstract class. An abstract class, as its name suggests, is an incomplete representation of a concept. Hence, creation of its objects isn't allowed.
cheers
Mala
Thanks, Mala for differetiating an abstract from a concrete class. It helps