亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

這些錯誤代碼是什么意思?

/85/1298/BUlD/HelloWorld.java:8: error: ';' expected
? ? ? ?int three += one ;
? ? ? ? ? ? ? ? ^
/85/1298/BUlD/HelloWorld.java:8: error: not a statement
? ? ? ?int three += one ;
? ? ? ? ? ? ? ? ? ? ^
/85/1298/BUlD/HelloWorld.java:10: error: ';' expected
? ? ? ?int three -= one ;
? ? ? ? ? ? ? ? ^
/85/1298/BUlD/HelloWorld.java:10: error: not a statement
? ? ? ?int three -= one ;
? ? ? ? ? ? ? ? ? ? ^
/85/1298/BUlD/HelloWorld.java:12: error: ';' expected
? ? ? ?int three *= one ;
? ? ? ? ? ? ? ? ^
/85/1298/BUlD/HelloWorld.java:12: error: not a statement
? ? ? ?int three *= one ;
? ? ? ? ? ? ? ? ? ? ^
/85/1298/BUlD/HelloWorld.java:14: error: ';' expected
? ? ? ?int three /= one ;
? ? ? ? ? ? ? ? ^
/85/1298/BUlD/HelloWorld.java:14: error: not a statement
? ? ? ?int three /= one ;
? ? ? ? ? ? ? ? ? ? ^
/85/1298/BUlD/HelloWorld.java:16: error: ';' expected
? ? ? ?double three %= one ;
? ? ? ? ? ? ? ? ? ?^
/85/1298/BUlD/HelloWorld.java:16: error: not a statement
? ? ? ?double three %= one ;
? ? ? ? ? ? ? ? ? ? ? ?^
10 errors

正在回答

2 回答

不要加int 再次聲明了,聲明一次就可以額

0 回復 有任何疑惑可以回復我~

不要重復聲明變量的數據類型,聲明一次就夠了。three聲明了好幾回數據類型。就好比一個人,都聲明是男人,反復聲明他是男人沒多大意義。

參考代碼

public?class?HelloWorld{
????public?static?void?main(String[]?args)?{
	???int?one?=?10?;
????????int?two?=?20?;
????????int?three?=?0?;
????????three?=?one+two?;
????????System.out.println("three?=?one?+?two==>"+three);
????????three?+=?one?;
????????System.out.println("three?+=?one?==>"+three);
????????three?-=?one?;
????????System.out.println("three?-=?one?==>"+three);
????????three?*=?one?;
????????System.out.println("three?*=?one?==>"+three);
????????three?/=?one?;
????????System.out.println("three?/=?one?==>"+three);
????????three?%=?one?;
????????System.out.println("three?%=?one?==>"+three);
????????
????????
????????}
}


1 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

這些錯誤代碼是什么意思?

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號