Sometimes there may be a need to crate a super class that only defines a generalized form that will be shared by all of its sub classes , leaving it to each sub class to fill in the details . Such a class determines the mature of the methods that the sub classes must implement. Abstract class provides a way to solve this type of situation.
Restrictions of abstract class :-
* Constructor never be declared as abstract .
* An object can't be created of abstract class since an abstract class is not fully defined .
* Can't declare an abstract static methods .
Restrictions of abstract class :-
* Constructor never be declared as abstract .
* An object can't be created of abstract class since an abstract class is not fully defined .
* Can't declare an abstract static methods .
No comments:
Post a Comment