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
提交
取消