📜  具有三个条件的条件(三元)运算符 - 无论代码示例

📅  最后修改于: 2022-03-11 14:59:49.149000             🧑  作者: Mango

代码示例1
String year = credits < 30 ? "freshman" : credits <= 59 ? "sophomore" : credits <= 89 ? "junior" : "senior";