Created
February 2, 2020 14:53
-
-
Save magdamiu/0c418d700466f4336e2626d7a013396b to your computer and use it in GitHub Desktop.
Interfaces in Kolin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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