代碼運(yùn)行錯(cuò)誤
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);
}
}
2018-07-13
舉報(bào)
2018-07-27
編寫代碼時(shí),代碼中的標(biāo)點(diǎn)符號(hào)必須是英文半角,比如?與?可以明顯看到2個(gè)問(wèn)號(hào)占用的空間不同,多練練就熟悉了。
2018-07-20
String mark = (score>=60)?"及格":"不及格";
? 不是英文改下就好了
2018-07-18
public class HelloWorld{
? ? public static void main(String[] args) {
int score=68;
String mark =(score>60?"及格":"不及格");
System.out.println("考試成績(jī)?nèi)绾危?+mark);
}
}
加個(gè)括號(hào)就好了
2018-07-16
是不是標(biāo)點(diǎn)字符輸入成中文格式的了
2018-07-13
public class HelloWorld{
? ? public static void main(String[] args) {
int score=68;
String mark = (score>=60)?"及格":"不及格";
System.out.println("考試成績(jī)?nèi)绾危?+mark);
}
}