List转Set
Set转List
数组转为List
3. String[] arr = { "1" , "2" }; 4. List list = Arrays.asList(arr); 数组转为Set
2. Set set = new HashSet(Arrays.asList(arr)); Map的值转化为List
Map的值转化为Set
List转数组
2. String[] arr = (String[])list.toArray( new String[list.size()]); |
|