| <<< Abstract Methods | Index | Abstract method and class in C++ >>> |
Presence of a single abstract method makes a class abstract.
It is prohibited to create objects of abstract classes.
It is allowed to create variables of a reference or pointer to an abstract class type.
Abstract classes can have data members and non-abstract methods.
Abstract method and class in Java:
public abstract class Document
{
public abstract void print();
//...
}//abstract class Document
| <<< Abstract Methods | Index | Abstract method and class in C++ >>> |