Created
July 21, 2017 18:29
-
-
Save joshskeen/01ecd38aa866e16db1cca7769660af34 to your computer and use it in GitHub Desktop.
overriding a function in kotlin
This file contains hidden or 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
open class Qaz { | |
open fun foo(): String { | |
return "FOO!" | |
} | |
} | |
class Bar : Qaz() { | |
override fun foo(): String { | |
return "FOO" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment