Horje
Kotlin ternary Code Example
[Solved] - Kotlin ternary Code Example
Try following codes
Kotlin ternary
if (a) b else c

println(if (true) "yes" else "no") // "yes"
println(if (false) "yes" else "no") // "no"
kotlin else if
if (a > b) {
  // if
} else if (a == b) {
  // else if
} else {
  // else
}
Date: 2022-05-21 05:02:10
Category: kotlin
More for You