Hey I wanted to ask how I can add elements in a new set that either are in my set a or set b or both sets. This is what I have until now. Would be nice of you could help me.
public static Set<String> vereinigung(Set<String> a, Set<String> b) {
Set<String> setForAB = new HashSet<String>();
//add elements from a
setForAB.add(String.valueOf(a));
//add elements from a
setForAB.add(String.valueOf(b));
//elements from both sets
setForAB.addAll(a);
setForAB.addAll(b);
return setForAB;
}