three=one+two;有什么用?
public class HelloWorld{
? ? public static void main(String[] args) {
? ?int one = 10 ;
? ? ? ? int two = 20 ;
? ? ? ? int three = 0 ;
? ? ?
? ? ? ? System.out.println("three+=one==>"+40);
? ? ? ? System.out.println("three-=one==>"+30);
? ? ? ? System.out.println("three*=one==>"+300);
同樣可以輸出
three+=one==>40
three-=one==>30
three*=one==>300
2017-07-08
這是運(yùn)算得出來的結(jié)果,three是一個變量,而不是常量,變量值可以重新被覆蓋的。
2017-06-30
那是因為輸出的就是40;30;300; ?你把這些數(shù)分別換成three+=one;three-=one;three*=one;試試,