两种都行1. List<String> strings = 你要去重的集合.stream().distinct().collect(Collectors.toList());
2. List<String> strings = new ArrayList<>(new TreeSet<>(你要去重的集合));
你要去重的集合