Saturday, July 28, 2012
An abstract class is one which cannot be instantiated. Its properties and characteristics cannot be used until and unless it is not inherited by a concrete class. So in order to use such type of classes you will have to extend that class and override its methods.
A final class is one that cannot be inherited i.e. a class defined as final cannot be extended and redefined using the software reusability concept of inheritance.
Now if you try to combine both of these two things, then the class declared final and abstract cannot be inherited as being declared final and since it is abstract we cannot use it directly by creating its object. Hence such a class is of no use and makes no sense at all. For this reason only it is not possible to declare a class both final and abstract.

0 comments:

Post a Comment

Total Pageviews

Followers


Labels

Popular Posts

free counters