字符串数组、字符串集合相互转换
作者:互联网
//字符串数组-->字符串集合 String[] strArr = {"AA","BB","CC"}; List<String> list = Arrays.asList(strArr); //字符串集合-->字符串数组 List<String> list = new ArrayList<>(); list.add("AA"); list.add("BB"); list.add("CC"); String[] strArr = list.toArray(new String[0]);
标签:String,strArr,list,集合,add,数组,字符串 来源: https://www.cnblogs.com/sunline/p/16545619.html