為啥第五行出錯
public class HelloWorld {
??? public static void main(String[] args) {
??int one = 20 ;
?if(one%2==0){
???? System.out.println("one是偶數(shù)");
?}
???
???
? ? ??
?}
}??
public class HelloWorld {
??? public static void main(String[] args) {
??int one = 20 ;
?if(one%2==0){
???? System.out.println("one是偶數(shù)");
?}
???
???
? ? ??
?}
}??
2020-03-30
舉報(bào)
2020-08-22
親測,樓上正解,有個(gè)小技巧,一般英文狀態(tài)下的標(biāo)點(diǎn)符號跟中文狀態(tài)下的標(biāo)點(diǎn)符號外觀就有不同的奧,
比如英文狀態(tài)下輸入的標(biāo)點(diǎn)符號外觀比較小一點(diǎn)
可以比較一下奧,比如分號,小括號等
希望對你有幫助?
改后源碼如下:
public class HelloWorld {
public static void main(String[] args) {
int one = 20 ;
if(one%2==0){
System.out.println("one是偶數(shù)");
?? }
? }
}
2020-03-30
你System.out.println("one是偶數(shù)");最后這個(gè)分號不是英文的分號;