add 的用法

add 的用法,第1张

1. add表示"加;增加",常与介词to连用,即"add ... to ...","把......加到......中去;往......中加......"。例如:

If you add 4 to 6, you get 10. 4加6等于10。

Add some hot water if you think the coffee is much too strong. 如果你觉得这咖啡太浓,就加点儿热水。

2. add表示"补充(说道)",即"又说;继续说"。例如:

"And I expect your little sister will come, too," added she. 她接着又说:"而且我希望你的小妹妹也能来。"

Mother added that we must get back as soon as possible. 妈妈接着又说我们必须尽早回来。

3. add to表示"增加;增添",其中to是介词,后接名词或代词。有时也可用来表示"(房屋的)扩建"或"(书的)续写"等。例如:

Each girl present at the party was wearing a flower in the hair, which added to their beauty. 参加晚会的姑娘人人头上都戴有一朵花,使得她们显得愈加漂亮。

The soldiers were extremely tired and the heavy rain added to their difficulty. 战士们累极了,而大雨更是增加了他们的困难。

This old house has been added to from time to time. 这幢老房子曾一再扩建。

Has that book of his been added to later? 他的那本书后来曾续写过吗?

4. add ... up 表示"把......加起来";add up to ... 则表示"加起来总和为......"。例如:

Can you add these ten figures up? 你能把这十个数字加起来吗?

All these figures add up to 5,050. 所有这些数字加起来总和为5,050。

此外,add up (to) 在口语中还有以下两种用法

1) 作"含义是;表示;等于;总而言之"讲。例如:

His remarks added up to a condemnation of my plan. 他的意见总之就是谴责我的计划。

2) 作"有意义;讲得通"。例如:

I don't think what she said added up at the meeting. 我认为她在会上的发言没有意义。

Add这个方法,每次都是加到ArrayList的最后的,所以是按顺序加进去的。

如果知道一个值,可以用

int nIndex = alist.IndexOf(元素值)

返回值是此元素的索引,没找到的话返回-1.

不明白的再问哟,望及时采纳,多谢!

有add into,add to和add into的区别为:意思不同、用法不同、侧重点不同。

一、意思不同

1、add to:增加,是对…的增添,加强。

2、add into:添加到。

二、用法不同

1、add to:add用作及物动词时的基本用法是add sth to sth 或add sth,可以把add sth 看作是省略了to sth,这主要用在适当的上下文中,特别是在说话双方对to sth 都很明确时。

2、add into:add既是普通用语,也是科技用语,主要指运用算术中的加法运算求出一系列数字或数量之和,广义则指把一物“加入”或“添加”到另一物中以“增加”原物的重量、规模、总量或重要性等。add还可表示“接着说”“还说”。

三、侧重点不同

1、add to:侧重于两者是平等关系,加到一起。

2、add into:侧重于是把一个加到另一个里去。


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/bake/7999871.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-04-12
下一篇2023-04-12

发表评论

登录后才能评论

评论列表(0条)

    保存