Abstract classes are classes that cannot be instantiated, which means that we cannot create objects of an abstract class. The main inspiration behind using abstract classes is that we can inherit from them. When a class inherits from an abstract class, it implements all abstract methods of the parent class.
How to work with an abstract class in Kotlin
Getting ready
You need to install a preferred development environment that compiles and runs Kotlin. You can also use the command line for the purpose, for which you need Kotlin compiler installed along with JDK. I am using online IDE at https://try.kotlinlang.org/ to compile and run my Kotlin code for this recipe.