数组转集合,List和set互转
数组转集合
String[] s = new String[]{"A", "B", "C", "D","E"};
List<String> list = Arrays.asList(s);
List Set互转
List转Set
Set<String> set = new HashSet<>(list);
Set转List
List<String> list_1 = new ArrayList<>(set);
数组转集合
String[] s = new String[]{"A", "B", "C", "D","E"};
List<String> list = Arrays.asList(s);
List Set互转
List转Set
Set<String> set = new HashSet<>(list);
Set转List
List<String> list_1 = new ArrayList<>(set);