kotlin return values function code example
Example 1: kotlin method return
fun sum(val a: Int, val b: Int): Int {
return a+b
}
fun sum(val a: Int, val b: Int) = a + b
Example 2: kotlin function return
fun sum(a: Int, b: Int): Int {
return a + b
}