score=>加不加括号是不是没区别
public class HelloWorld{ public static void main(String[] args) { int score=60; String mark=score>=60?("及格"):("不及格"); System.out.println("考试成绩如何:"+mark); } }
public class HelloWorld{ public static void main(String[] args) { int score=60; String mark=score>=60?("及格"):("不及格"); System.out.println("考试成绩如何:"+mark); } }
2021-01-05
举报