abstract Java Keyword

The abstract keyword may modify a class or a method.

An abstract class can be extended (subclassed) but cannot be instantiated directly.

An abstract method is not implemented in the class in which it is declared, but must be overridden in some subclass.

Examples

  public abstract class MyClass
  {
  }
  
  public abstract String myMethod();
  

Remarks

Related Topics

final Java Keyword

private Java Keyword

static Java Keyword