條件運算符
public class HelloWorld{ ? ?public static void main(String[] args) { int score=68; String mark=(score >= 60) ? "及格" : "不及格"; System.out.println("考試成績如何:"+mark); } } 顯示錯誤,哪錯了呢?
public class HelloWorld{ ? ?public static void main(String[] args) { int score=68; String mark=(score >= 60) ? "及格" : "不及格"; System.out.println("考試成績如何:"+mark); } } 顯示錯誤,哪錯了呢?
2017-07-14
舉報
2017-07-14
用myeclipse運行,是正確的。。。
2017-07-14
應該是