ObjectiveMcq
Print Protected
This page is protected for print. Use the website to view the content.
How do you define a single-line function in Kotlin?
Correct Answer: B — Use an equals sign = followed by the expression
In Kotlin, single-line functions can be defined concisely using an equals sign = followed by the expression, e.g., fun add(a: Int, b: Int) = a + b.