ArrayList
ArrayList 转 数组
T可取String,Integer,Character等包装类
List<T> list =new ArrayList<>();
T[] arr = (T[])list.toArray(new T[list.size()]);
ArrayList 转 HashSet
T可取String,Integer,Character等包装类
List<T> list =new ArrayList<>();
Set<T> set = new HashSet(list);
HashSet