three = one+ two ==>30three += one ==>40three -= one ==>30three *= one ==>300three /= one ==>30three %= one ==>0
3 回答

Perona
TA貢獻355條經驗 獲得超403個贊
前面是字符串,后面是變量值
參考代碼
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); ????????} }
添加回答
舉報
0/150
提交
取消