Question: Question 5 : Set Operations Suppose you have two HashSet collections groupA and groupB with the following contents: Set groupA = new HashSet > (
Question : Set Operations
Suppose you have two HashSet collections groupA and groupB with the following contents:
Set groupA new HashSetArraysasListAlice "Bob", "Charlie", "Diana";
Set groupB new HashSetArraysasListCharlie "Diana", "Eve", "Frank";
Questions:
a Calculate the union of groupA and groupB and output the result.
b Calculate the intersection of groupA and groupB and output the result.
c Calculate the difference of groupA and groupB ie the elements in groupA but not in groupB and output the result.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
