利用
Arrays#asList(T...a)创建
“(通过写‘到数组中。更改到返回的列表)’由指定数组支持的固定大小的列表。”
Integer[] intArray = {1, 2, 3, 42}; // cannot use int[] hereList<Integer> intList = Arrays.asList(intArray);或者,解耦两个数据结构:
List<Integer> intList = new ArrayList<Integer>(intArray.length);for (int i=0; i<intArray.length; i++){ intList.add(intArray[i]);}或更简洁:
List<Integer> intList = new ArrayList<Integer>(Arrays.asList(intArray));


![将int []转换为ArrayList 将int []转换为ArrayList](http://www.mshxw.com/aiimages/31/483627.png)
