1.

What Is The Abstract Method Modifier?

Answer»

When the abstract keyword precedes a class method, you cannot create an instance of the class CONTAINING the method. Abstract METHODS do not provide an IMPLEMENTATION. Instead, your abstract method DEFINITION only indicates the arguments return type. When a subclass extends the class containing the abstract method, the subclass is required to supply the implementation for the abstract method. To declare a method abstract, simply provides the abstract keyword , as follows:
public abstract void implementMeLater(int x) ;

When the abstract keyword precedes a class method, you cannot create an instance of the class containing the method. Abstract methods do not provide an implementation. Instead, your abstract method definition only indicates the arguments return type. When a subclass extends the class containing the abstract method, the subclass is required to supply the implementation for the abstract method. To declare a method abstract, simply provides the abstract keyword , as follows:
public abstract void implementMeLater(int x) ;



Discussion

No Comment Found