Created
August 12, 2017 11:51
-
-
Save the-cybersapien/dd12adb2c7c18f872fea421746e7320e to your computer and use it in GitHub Desktop.
KotlinDemo
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
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