Here you can find the source of asList(int[] values)
public static ArrayList<Integer> asList(int[] values)
//package com.java2s; /* @(#)ArrayUtil.java// w w w.j a va 2s . c o m * * Copyright (c) 2003 Werner Randelshofer, Switzerland. MIT License. * * Implementation derived from Sun's Java 1.4 VM. */ import java.util.ArrayList; public class Main { public static ArrayList<Integer> asList(int[] values) { if (values == null) { return null; } ArrayList<Integer> list = new ArrayList<Integer>(values.length); for (int i = 0; i < values.length; i++) { list.add(new Integer(values[i])); } return list; } }