语法:条件:执行1?执行2; 如果条件为真,则执行1,否则执行2;
ex:
int a; a = 1>2:12?13; 则 a = 13;
Java 三元运算符
原文:https://www.cnblogs.com/hello-dummy/p/9161761.html