三元运算符

条件式 ?值1:值2

boolean b = 20 < 45 ? true : false;

posted @ 2021-09-27 23:51  年年ℓ  阅读(23)  评论(0)    收藏  举报