标签:三元 int span java system sys str 运算 color
int s = 3 ; System.out.println(s ==0 ? "一般" : s ==1 ? "不满意" : s == 2 ? "满意" : s ==3 ? "超棒!" : "未知");
输出 "超棒!";
java 三元运算多判断
原文地址:https://www.cnblogs.com/todarcy/p/13298312.html