Have 2 sets with duplicates set1 ={1,2,3,4,5}
set2 = {1,3,6,7}
and the result should be set3 ={2,4,5,6,7}
Please let me reiterate that I want to use Set interface and the result set should be ordered natural.
Removing duplicates from arraylist using set
611 views Asked by user_falafel At
2
Code:
Output: