Kotlin ternary
if (a) b else c
println(if (true) "yes" else "no") // "yes"
println(if (false) "yes" else "no") // "no"
0
6
if (a > b) {
// if
} else if (a == b) {
// else if
} else {
// else
}
Thank you!
6
0
Are there any code examples left?
New code examples in category Kotlin