0
How to get the union of two string list or remove duplicates
Please I need help with adding string list without duplicates. Example is given below. String s = "633,1985,4088,5476,9806,10138,10197,10533,10558,10710,11614,12163,12350,12548,12573,12577,12578,13689,13699,15796,20250"; String s2 = "5476,10558,10710,11614,12350,12548,12573,12577,12578"; I need to get the union. I've been trying to get the union
2 Respostas
0
.split into Arrays both strings.
Add all to a HashSet<String>
Call toString if you want a String back.
0
Thanks.