Here you can find the source of asList(int[] a)
public static List<Integer> asList(int[] a)
//package com.java2s; import java.util.ArrayList; import java.util.List; public class Main { public static List<Integer> asList(int[] a) { List<Integer> result = new ArrayList<Integer>(a.length); for (int i = 0; i < a.length; i++) { result.add(Integer.valueOf(a[i])); }/*w ww . j a v a2s . c om*/ return result; } public static List<Double> asList(double[] a) { List<Double> result = new ArrayList<Double>(a.length); for (int i = 0; i < a.length; i++) { result.add(new Double(a[i])); } return result; } }