Skip to content

Instantly share code, notes, and snippets.

@PatilShreyas
Last active December 21, 2020 13:52
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 PatilShreyas/6c52527a196b992940346fefd474285d to your computer and use it in GitHub Desktop.
Save PatilShreyas/6c52527a196b992940346fefd474285d to your computer and use it in GitHub Desktop.
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