~/ 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/020ba840-e457-48e4-9a19-849721297442/flashcard utf-8 LF