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
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) | |
} |
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
// 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