慕学习者666
2018-05-20 20:09
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);
你的加号有问题,可能是你的输入法不对,要更换成英文的加号,我刚刚更改之后运行正常。
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);
修改了符号,怎么还运行不了
输出时,字符串拼接变量名时的+号是中文的所以报错,你的所有的输出的+号都是中文的+
Java入门第一季(IDEA工具)升级版
1165172 学习 · 17581 问题
相似问题