kotlin fun example
Example 1: kotlin function
fun sum(a: Int, b: Int): Int {
return a + b
}
Example 2: return type in kotlin function
//Function having two Int parameters with Int return type
fun sum(a: Int, b: Int): Int {
return a + b
}
Example 3: make function kotlin
fun main() {
println("This is a function")
}