<span>Collection集合与数组间的转换</span>
1、集合-->数组:toArray()
Collection coll = new ArrayList();
coll.add(133);
coll.add(53);
Object[] array = coll.toArray();
2、数组-->集合:调用Arrays类的静态方法asList()
List<String> list = Arrays.asList(new String[]{"as","wa"});
List list1 = Arrays.asList(new int[]{12,123});
System.out.println(list1.size()); //返回值为1
List list2 = Arrays.asList(new Integer[]{12,123});
System.out.println(list2.size()); //返回值为2