Search⌘ K
AI Features

Abstract Class

Explore the concept of abstract classes in Kotlin, including how they serve as templates with both abstract and concrete methods. Understand when and why to use abstract classes and how subclasses must implement abstract functions. This lesson helps you grasp inheritance nuances and design extensible programs.

Understanding abstract classes

Mammals are a group of animals, not a concrete species. The term defines a set of characteristics but might not exist in itself. To define a class that can only be used as a superclass of other classes but cannot produce an object, we use the abstract keyword before its class definition. ...