JAVA : Set addAll() vs adding using loop

后端 未结 3 699
轮回少年
轮回少年 2021-01-13 04:24

I was trying to add Integers from 2 sets into single Set via for loop and also using addAll() method provided by Collections. For test purpose, I have populated 2 Sets with

3条回答
  •  生来不讨喜
    2021-01-13 05:07

    Check the implementation of the addAll method - nothing different that what you'd do - AbstractCollection code

提交回复
热议问题