Delete comment from: Java67
You can also use the new Java 8 Streams API, and the "distinct" method like this:
List primesWithoutDuplicates = primes.stream()
.distinct()
.collect(Collectors.toList());
Sep 19, 2015, 4:28:32 PM
Posted to How to Remove Duplicates from ArrayList in Java [Example]