~/ learn/ java-from-zero/ cards/ abstract classes & methods — and final
1 of 4

Type an abstract class with an abstract method

Type an abstract class with an abstract method

Answer

abstract class Shape { abstract double area(); }

abstract on the class prevents instantiation. abstract on the method omits the body; every non-abstract subclass must provide one with @Override.

space flip · ← → navigate · esc to exit
NORMAL ~/memra/library/bf4a596f-f0da-4a21-bcba-f2e1f61f1721/flashcard utf-8 LF