三元运算符
package operator;
public class Demo08 {
public static void main(String[] args) {
//三元运算符 x ? y : z
// 如果 x = true 则 y 否则 z
int score = 60;
String type = score < 50 ? "不及格" : "及格";
System.out.println(type);
}
}
毛主席说过:前途是光明的,道路是曲折的
我i们要 下定决心,不怕牺牲,排除万难,争取胜利
加油 加油 加油
浙公网安备 33010602011771号