Kotlin中三元运算符

int a = 10;
int b = 11;
int c = a > b ? a : b;

到了 kotlin中
val a = 10
val b = 11
val c = if (a > b) a else b
原文地址:https://www.cnblogs.com/gloryhope/p/10283282.html