Skip to content

Instantly share code, notes, and snippets.

@the-cybersapien
Created August 12, 2017 11:51
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 the-cybersapien/dd12adb2c7c18f872fea421746e7320e to your computer and use it in GitHub Desktop.
Save the-cybersapien/dd12adb2c7c18f872fea421746e7320e to your computer and use it in GitHub Desktop.
KotlinDemo
abstract class Calculate {
abstract fun add(a: Int, b: Int): Int
}
fun main(args: Array) {
val result = object : Calculate() {
override fun add(a: Int, b: Int): Int {
return a + b
}
}.add(11010, 22011)
println(result)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment