I have a situation where I will be receiving 2+ ArrayList and I need to be able to merge all the lists and remove any duplicate Widget so
ArrayList
Widget
I would do it this way
Set set = new HashSet<>(list1); set.addAll(list2); List mergeList = new ArrayList<>(set);