幫我看一下哪里有問(wèn)題
public class HelloWorld{
? ? public static void main(String[] args) {
int score=68;
String mark =(score>=60)? "及格" :"不及格";
System.out.println("考試成績(jī)?nèi)绾危?+mark);
}
}
public class HelloWorld{
? ? public static void main(String[] args) {
int score=68;
String mark =(score>=60)? "及格" :"不及格";
System.out.println("考試成績(jī)?nèi)绾危?+mark);
}
}
2019-07-08
舉報(bào)
2019-11-15
:是 中文輸入法的冒號(hào)
因?yàn)檩斎敕ǖ拿疤?hào)是:
2019-07-08
public class HelloWorld{
? ? public static void main(String[] args) {
int score=68;
String mark =(score>=60)? "及格" :"不及格";//冒號(hào)用的中文字符,應(yīng)使用":";
System.out.println("考試成績(jī)?nèi)绾危?+mark);
}
}