how to remove duplicate elements from list in java 8 code example
Example: java remove equal element of a list
public static <T> List<T> removeDuplicates(List<T> list){
Set<T> set = new LinkedHashSet<>(list);
return new ArrayList<T>(set);
}
public static <T> List<T> removeDuplicates(List<T> list){
Set<T> set = new LinkedHashSet<>(list);
return new ArrayList<T>(set);
}