1.String[]转list
String[] arr = {"a", "b"};
List<String> list = Arrays.asList(arr); //此集合无法操作添加元素
List<String> list1 = new ArrayList<String>(list); //此集合可操作元素
2.list转String[]
List<String> list = new ArrayList<>();
list.add("a");
list.add("b");
String[] arr = list.toArray(new String[list.size()]);