package com.itheima.operator;public class OperatorDemo8 {public static void main(String[] args) {// 目标:学会使用三元运算符,理解其流程double score = 18;String rs = score >= 60 ? "考试通过":"挂科";System.out.println(rs);//需求:需要从2个整数中找出较大值int a = 10000;int b = 2000;int max = a > b ? a :b;System.out.println(max);}
}