Hi,
What is an abstract method?
thanks
Hi friend,
Abstract methods are the methods declared using the keyword 'abstract'. An abstract method must not be defined in its declaring class and it should be closed by following the semicolon at the end of line. An abstract method is defined by its implementing class or subclass. A class which declares the abstract method then this class must be declared as abstract.
An abstract method should be declared as follows :
abstract void show(); abstract void display(String name);
A class that includes the abstract method must be declared as follows :
public abstract class Show { // declare fields // declare non-abstract methods abstract void show(); abstract void display(String name); }