Skip to content

Instantly share code, notes, and snippets.

@PatilShreyas
Last active December 21, 2020 13:52
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