boolean
public class HelloWorld{ ? ?public static void main(String[] args) { int score=68; String mark =(score>=60)?"及格":"不及格"; System.out.println(mark); } } 為什么跑出來(lái)的結(jié)果不對(duì)? 有多個(gè)錯(cuò)誤,求指點(diǎn)!
public class HelloWorld{ ? ?public static void main(String[] args) { int score=68; String mark =(score>=60)?"及格":"不及格"; System.out.println(mark); } } 為什么跑出來(lái)的結(jié)果不對(duì)? 有多個(gè)錯(cuò)誤,求指點(diǎn)!
2015-11-30
舉報(bào)
2015-11-30
符號(hào)不規(guī)范,大小括號(hào)及冒號(hào)請(qǐng)使用英文的,以下運(yùn)行正確的代碼:
public static void main(String[] args) {?
int score=68;?
String mark =(score>=60)?"及格":"不及格";?
System.out.println(mark);?
}?
2015-11-30
String mark =(score>=60)?"及格":"不及格" ?后面要有 ; 號(hào) ?符號(hào)用英文寫(xiě) ?