Skip to content

Instantly share code, notes, and snippets.

@magdamiu
Created Feb 2, 2020
Embed
What would you like to do?
Abstract classes in Kotlin
abstract class Car {
abstract fun run()
open fun computeTaxes() {}
}
abstract class SafeCar: Car() {
override fun run() {
println("SafeCar is running safely..")
}
override abstract fun computeTaxes()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment