What is the equivalent of this expression in Kotlin.
a ? b : c
This is giving error.
What is the equivalent of this expression in Kotlin.
a ? b : c
This is giving error.
In Kotlin, if statements are expressions. So the following code is equivalent:
if (a) b else c
Hope it's working for you.