标签:nbsp class www ring log span ons arrays slist
数组转list
方法1:
String[] stringArray = { "a", "b", "c", "d", "e" };
List<String> list = Arrays.asList(stringArray);
方法2:
ArrayList<String> arrayList = new ArrayList<String>(Arrays.asList(stringArray));
方法3:
List<String> list1 = new ArrayList<String>(stringArray.length); Collections.addAll(list1, stringArray);
list转数组
List<String> list = new ArrayList<String>(); list.add("1"); list.add("2"); list.add("3"); String[] strings = new String[list.size()]; list.toArray(strings);
参考:http://www.cnblogs.com/liushaobo/p/4423102.html
标签:nbsp class www ring log span ons arrays slist
原文地址:http://www.cnblogs.com/ooo0/p/7657386.html