Answers for "kotlin short if"

7

Kotlin ternary

if (a) b else c

println(if (true) "yes" else "no") // "yes"
println(if (false) "yes" else "no") // "no"
Posted by: Guest on May-10-2020
0

kotlin short if

return (!response.isSuccessful()) ? "fail" : response.body().string()
Posted by: Guest on October-30-2021

Browse Popular Code Answers by Language