I am trying to list out duplicate elements in the integer list say for eg,
List<Integer> numbers = Arrays.asList(new Integer[]{1,2,1,3,4,4});
using Streams of jdk 8. Has anybody tried out. To remove the duplicates we can use the distinct() api. But what about finding the duplicated elements ? Anybody can help me out ?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…