Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Abstract Classes

Abstract classes are partially-implemented classes, with missing features that will need to be provided in subclasses.

Although it is not possible to create instances of such classes, because they are incomplete, they are nevertheless useful in situations where we need a more general way of referring to instances of subclasses, in order to support polymorphism.

After completing this section, you will understand how abstract classes are defined in Kotlin and how they can be used in object-oriented applications.