Find only repeated String attributes in list with Java 8
10
1
I know below is the code to find out the occurrence of each String attributes in list , how can I filter this list with only duplicates item i.e having more than 1 occurrence. Sorry I am new to java 8 . Map<String, Long> result = list.stream() .collect(Collectors.groupingBy(Function.identity(), Collectors.counting()));
java java-8 java-stream
share | improve this question
edited Dec 2 '18 at 19:57
Aomine
39.7k 7 37 70
asked Dec 2 '18 at 19:51
...