public class lianxi2{? ? 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=0 這個是什么意思?
6 回答

大咪
TA貢獻785條經(jīng)驗 獲得超332個贊
舉個例子,就相當于和語文中的前綴一樣。。。。給后面three做個鋪墊,做個解釋,每個變量都需要設置一個類型,這樣把變量初始化,所以three要先int一下,讓他等于0,或者int three這樣也行。
添加回答
舉報
0/150
提交
取消