Skip to content

Instantly share code, notes, and snippets.

@PatilShreyas

PatilShreyas/1-Old.kt Secret

Last active Dec 21, 2020
Embed
What would you like to do?
object MathUtils {
fun add(a: Int, b: Int): Int { /* Function body */ }
fun sub(a: Int, b: Int): Int { /* Function body */ }
}
fun main() {
val sumResult = MathUtils.add(10, 20)
val subResult = MathUtils.sub(30, 10)
}
// On top of the file
fun add(a: Int, b: Int): Int { /* Function body */ }
fun sub(a: Int, b: Int): Int { /* Function body */ }
fun main() {
val sumResult = add(10, 20)
val subResult = sub(30, 10)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment