int one = 10 ; int two = 20 ; int three = 0 ;為什么three=one+two
int one = 10 ;
? ? ? ? int two = 20 ;
? ? ? ? int three = 0 ;其中這個(gè)three的值不是0嗎,怎么能three=one+two?
? ? ? ??
int one = 10 ;
? ? ? ? int two = 20 ;
? ? ? ? int three = 0 ;其中這個(gè)three的值不是0嗎,怎么能three=one+two?
? ? ? ??
2015-12-29
舉報(bào)
2015-12-29
one two three 都是變量,而=只是一個(gè)賦值運(yùn)算符,只是暫時(shí)的給他們一個(gè)值,后面可以隨意變化的,在編程語(yǔ)言中==才是不變的量。
2015-12-29
==與=不要混淆,判斷是否相等是==