List和Set转换


List list = new ArrayList(new Hashset());// Fixed-size list
List list = Arrays.asList(array);// Growable
list list = new LinkedList(Arrays.asList(array));// Duplicate elements are discarded
Set set = new HashSet(Arrays.asList(array));

你可能感兴趣的:(list)