慕村0132041
2016-09-27 20:36
public class HelloWorld{ public static void main(String[] args) { int one = 10 ; int two = 20 ; int three = 0 ; int three=one+two; System.out.println("three="+three); int three+=one; System.out.println("three="+three); int three-=one; System.out.println("three="+three); int three*=one; System.out.println("three="+three); int three/=one; System.out.println("three="+three); int three%=one; System.out.println("three="+three); } }
第5行已经将three设为int型了,下面不需要重复定义。
Java入门第一季(IDEA工具)升级版
1165171 学习 · 17581 问题
相似问题