Skip to content

Instantly share code, notes, and snippets.

@sasssass
Last active October 23, 2023 13:13
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/e714e527f135f8f1ccc761f88a974644 to your computer and use it in GitHub Desktop.
Save sasssass/e714e527f135f8f1ccc761f88a974644 to your computer and use it in GitHub Desktop.
polymorphism.kt
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