数组:String[] array = {'1','2','3','4','5','6',};
集合:List<String> List = new ArrayList<>();
1.数组转集合
List<String> resultList = new ArrayList<>(Arrays.asList(array));
2.集合转数组
String[] codearray = resultList.toArray(new String[resultList.size()]);