list with only unique values java code example
Example: java get distinct values from list
List<String> distinctElements = list.stream()
.distinct()
.collect(Collectors.toList());
List<String> distinctElements = list.stream()
.distinct()
.collect(Collectors.toList());