Skip to content

Instantly share code, notes, and snippets.

@sasssass
Created October 23, 2023 13:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sasssass/c925d87bf91f745dbe022d031757cddb to your computer and use it in GitHub Desktop.
Save sasssass/c925d87bf91f745dbe022d031757cddb to your computer and use it in GitHub Desktop.
abstractation.kt
abstract class Animal(val name: String) {
fun move() {
// Imp
}
abstract fun eat()
}
class Bird (name: String) : Animal(name) {
override fun eat() {
// Imp
}
}
fun main() {
val bird: Animal = Bird("Canary")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment