车1366899
2020-10-14 11:08
three-=one----------------three=three-one的值不是20吗,为什么是30
three -= one; (此处three=40,上一步得到的) //three-=one ==40-10=30
System.out.println(three); //30
three *= one; //300
System.out.println(three);
three /= one; //30
System.out.println(three);
three %= one;
System.out.println(three); 0
int one = 10 ;
int two = 20 ;
int three = 0 ;
three = one+two; = 30
three += one; =40
System.out.println(three);
three -= one; (此处three=40,上一步得到的)
System.out.println(three);
three *= one;
System.out.println(three);
three /= one;
System.out.println(three);
three %= one;
System.out.println(three);
别忘了,three的值一直在变化
Java入门第一季(IDEA工具)升级版
1165172 学习 · 17581 问题
相似问题