|
Java Reference Home | Smart Soft Home |
|
|
abstract
The keyword abstract has two uses: a class modifier and a method modifier. Description #1 - Class ModifierAs a class modifier, it specifies that the class is abstract. An abstract class can not be instantiated. It exists only to be subclassed by other classes. Description #2 - Method ModifierAs a method modifier, it specifies that the method is abstract. An abstract method defines a method signature but not a method implementation. Implementation is deferred to a subclass. Example
abstract public class Shape{
abstract public double getArea();
}
|
|