What are abstract methods in java?

An abstract method is the method which doesn’t have any body.

Abstract method is declared with keyword abstract and semicolon in place of method body.

Signature : public abstract void <method_name>();

Ex : public abstract void getDetails();

It is the responsibility of subclass to provide implementation to abstract method defined in abstract class.


Posted

in

Tags:

Comments

Leave a Reply