Kotlin - Functions
What will be the output of this Kotlin code?
fun square(x: Int) = x * x println(square(4))
fun square(x: Int) = x * x println(square(4))
square returns the product of x times x.square(4) returns 16, which is printed.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions