Close sidebar

If class is declared abstract then why abstract keyword used before method in abstract class?

In abstract class we declare whole class as abstract i.e incomplete then why abstract keyword needs to declare before method?

Your Answer

An abstract method adds the incompleteness to class, thus compiler wants to declare whole class abstract. The only way to use an abstract class in your application is to extend this class. Its subclasses if not declared abstract again, can be instantiated.

Comments

Didn't get the answer.
Contact people of Talent-Core Java directly by clicking here