Last active
October 23, 2023 13:13
-
-
Save sasssass/e714e527f135f8f1ccc761f88a974644 to your computer and use it in GitHub Desktop.
polymorphism.kt
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
class Something { | |
fun doSth() { | |
println("no number") | |
} | |
fun doSth(input: Int) { | |
println(input) | |
} | |
} | |
fun main() { | |
val obj : Something = Something() | |
obj.doSth() | |
obj.doSth(2) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment