想在西雅图买房的全栈狗
2016-04-17 13:16
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); } }
这边的运算为什么不用前面加int?
因为你前面已经定义过了,所以后面不需要再用int定义了
Java入门第一季(IDEA工具)升级版
1165547 学习 · 17586 问题
相似问题