Java - Abstract Modifier


Abstract is a modifier that require override.

An abstract class is a class that can't be instantiated. It's only purpose to be extended by other classes. See Java - (Inheritance|Class Hierarchy) - (Subclass|Superclass) - (Extends, Super) - ( is a relationship)

An enum cannot be abstract.



Abstract class provides a skeletal implementation of an interface, to minimize the effort required to implement this interface.

Abstract classes cannot be instantiated, but they can be subclassed.

An abstract class may or may not include abstract methods.


An abstract method is a method that is declared without an implementation (without braces, and followed by a semicolon), like this:

abstract void moveTo(double deltaX, double deltaY);

Powered by ComboStrap