This post provides examples, showing how to remove duplicate items from an ArrayList in Java.
Remove Duplicate Strings From ArrayList
Set cannot hold duplicate elements, we can instantiate a
Set object passing in the ArrayList with duplicates as a parameter.
Remove Duplicate Integers From List
Likewise, we can use the same methodology to remove duplicate integers.
Remove Duplicates From List Using Java 8 Lambdas