當前位置:成語大全網 - 英語詞典 - expected有什麽意思,在java中。

expected有什麽意思,在java中。

expected在英語中是預料預期的意思,如果在JAVA編程中出現則表示在字符串中輸入了換行符。編譯器就會報錯:Line nn: ';' expected?

處理方法:將字符串拆分為兩個, 確保字符串中都沒有新行, 並將它們與 + 連接起來就可以了。

expected 英[?k?spekt?d] 美[?k?spekt?d]

adj. 預料的; 預期的;

v. 預料; 預期; 預計; 等待; 期待; 盼望; 要求; 指望;

[詞典] expect的過去分詞和過去式;

1、As expected, it rained.?

果不其然下了雨。

2、It may be that you will feel the exact opposite of what you expected.?

可能妳的感覺將和妳的期盼剛好相反。

3、Scientists have collected more data than expected.?

科學家們已經收集到了比預期更多的數據。

擴展資料 expect的用法

1、表示期待,期望,通常為及物動詞,不要受漢語影響在其後誤加介詞for。如:

我們不能期望壹夜之間就取得成功。

如:We should not expect success overnight.

2、後接動詞時要用不定式,不用動名詞。如:

I did not expect to find you here. 我沒料到在這裏碰到妳。

若語義需要,其後還可接不定式的復合結構。

如:He expected her to go with him. 他期望她同他壹起去。

3、不要認為 expect 只表示;期待;期望,它還可表示;預計;預料等。如:

I expect a storm. 我預計會有場暴風雨來。

I expect that I will be back on Sunday. 我預計星期日回來。

有時可用於不好的方面。

如:He expects to fail the exam. 他預料無法通過考試。

另外,註意expect a baby這壹慣用表達,其意為;懷孕。如:

It is public knowledge she is expecting a baby. 大家都知道她已懷孕了。

4、其後可接 that 從句,若從句謂語為否定,註意否定的轉移。如:

I don't expect that he has done such a thing. 我預料他不會幹出這種事來。

在口語中有可表示;想或;揣想。如:

I expect you are tired. 我想妳是累了吧。