請問哪里錯(cuò)了,提示錯(cuò)誤
public class HelloWorld{
??? public static void main(String[] args) {
?? ??? ?int score=68;
?? ??? ?String mark =(score>=60)?"及格":"不及格";
?? ??? ?System.out.println("考試成績?nèi)绾危?+mark);
?? ?}
}
public class HelloWorld{
??? public static void main(String[] args) {
?? ??? ?int score=68;
?? ??? ?String mark =(score>=60)?"及格":"不及格";
?? ??? ?System.out.println("考試成績?nèi)绾危?+mark);
?? ?}
}
2017-02-22
舉報(bào)
2017-03-01
<code>public class HelloWorld{
??? public static void main(String[] args) {
?? ??? ?int score=68;
?? ??? ?String mark = (score>=60)?"及格":"不及格";
?? ??? ?System.out.println("考試成績?nèi)绾危?+mark);
?? ?}
}
</code>
2017-02-23
三元運(yùn)算符里的問號(hào)是中文的,后兩行代碼前面好像還有全角空格,直接復(fù)制粘貼下面的試試吧
求采納
2017-02-22
+在Mark前面