Skip to content

Instantly share code, notes, and snippets.

@magdamiu
Created February 2, 2020 14:53
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 magdamiu/0c418d700466f4336e2626d7a013396b to your computer and use it in GitHub Desktop.
Save magdamiu/0c418d700466f4336e2626d7a013396b to your computer and use it in GitHub Desktop.
Interfaces in Kolin
interface Pet {
fun eat()
fun sleep()
}
class Cat : Pet {
override fun eat() {
println("Cat eats fish")
}
override fun sleep() {
println("Cat sleeps a lot")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment