spand
06/12/2019, 11:07 AM? :
in kotlinnecati
06/12/2019, 11:02 PMval str = if (exp) "true" else "false"
However, you can’t write this in Java like that so that’s the reason of ternary has born.
String str = exp ? "true" : "false"
Ch8n
06/14/2019, 6:50 PM