New course! Every coder should learn Generative AI!
Try a free lesson0
How do you find the union of the set with a given set? OUTPUT: a Set object. I am so lost.
Java
2 Answers
+ 1
A union of two sets is when the item is found in one of the sets (A∪B).
The simplest way to do it is:
A.addAll(B)
0
Ok, i see, thank you