Hello everyone,
I have two lists/arrays of variable size A, B and I would like to get everything extra a list B might have, that list A does not.
public int a = {2,2,3,2,0};
public int b = {3,2,1};
---------------> 1
I have found some java code, however I could not figure out how to implement it :
Set<Date> ad = new HashSet<Date>(a);
Set<Date> bd = new HashSet<Date>(b);
ad.removeAll(bd);
and
List toReturn = new ArrayList(a);
toReturn.removeAll(b);
return toReturn;
Hopefully it’s not too stupid of a question since I could not find it anywhere.
Thank you for any thoughts on this !