第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

賦值運(yùn)算符的除等于 求大神解答??

如示例 int one = 10 ;

? ? ? ?int two = 20 ;

? ? ? ?int three = 0 ;

? ? ? ?three = one + two;

? ? ? ?System.out.println("there = 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);

輸出的結(jié)果是

there = one + two ==>30

three += one ==>40

three -= one ==>30

three *= one ==>300

three /= one ==>30

three %= one ==>0

我想問(wèn)一下當(dāng)除等于的時(shí)候?yàn)槭裁词?0 而不是3 根據(jù)示例說(shuō)明 C/=A 相當(dāng)于 C=C/A 。

或者在*=的時(shí)THREE的值已經(jīng)變成了 300 才導(dǎo)致除等于是30的嗎?? 求大神解答???

正在回答

3 回答


three?=?300;
one?=?10;
three?/=?one;//相當(dāng)于?three?=?three?/?one;?相當(dāng)于?three?=?300?/?10;?所有就是30


1 回復(fù) 有任何疑惑可以回復(fù)我~

這里的 = 是賦值號(hào) ? ? ==才是等號(hào)

1 回復(fù) 有任何疑惑可以回復(fù)我~
#1

QTIN 提問(wèn)者

明白了,太感謝了。
2016-03-16 回復(fù) 有任何疑惑可以回復(fù)我~

three在*=的時(shí)候值已經(jīng)變成了300

1 回復(fù) 有任何疑惑可以回復(fù)我~
#1

qq_一切隨風(fēng)_3

那int three=0;其實(shí)這個(gè)0可以是任何數(shù)字的是嗎,因?yàn)楹竺嬗兄匦赂郊犹?hào)的所有前面這個(gè)是多少?zèng)]有關(guān)系的吧哪怕是10000也可以,我試了下沒(méi)有報(bào)錯(cuò)。
2016-03-16 回復(fù) 有任何疑惑可以回復(fù)我~
#2

QTIN 提問(wèn)者

嗯 ,謝謝了,我已經(jīng)搞明白了。
2016-03-16 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

賦值運(yùn)算符的除等于 求大神解答??

我要回答 關(guān)注問(wèn)題
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)