ArrayList<String> listWithDuplicateValues = new ArrayList<>(); list.add("first"); list.add("first"); list.add("second"); ArrayList uniqueList = (ArrayList) listWithDuplicateValues.stream().distinct().collect(Collectors.toList());