6.4

6.4 ?:运算符

唯一一个三目运算符, 可以用来替换if else
通用格式
expression1 ? expression2 : expression3;
可以将一个条件表达式嵌入到另一个条件表达式中