Here you can find the source of asList(int[] array)
public static List<Integer> asList(int[] array)
//package com.java2s; import java.util.*; public class Main { /** needed because Arrays.asList() won't to autoboxing, * so if you give it a primitive array you get a * singleton list back with just that array as an element. *//*from ww w . ja v a2 s . c o m*/ public static List<Integer> asList(int[] array) { List<Integer> l = new ArrayList<>(); for (int i : array) { l.add(i); } return l; } }