// x ? y : z//如果x==true ,则结果为y,否则结果为yint score = 60;String type = score < 60 ? score + "分,不及格,继续努力" : "恭喜你"+score +"分,及格了";System.out.println(type);