List<String>去重

public static List<String> removeDuplicate(List<String> list) {
HashSet<String> h = new HashSet<String>(list);
list.clear();
list.addAll(h);
return list;
}

posted @ 2019-08-29 15:14  塞壬的港湾  阅读(4262)  评论(0编辑  收藏  举报