Here you can find the source of toArrayList(int[] intValues)
public static ArrayList<Integer> toArrayList(int[] intValues)
//package com.java2s; /*/*from w w w . j a v a 2s. c o m*/ * Copyright 2000-2013 Enonic AS * http://www.enonic.com/license */ import java.util.*; public class Main { public static ArrayList<Integer> toArrayList(int[] intValues) { if (intValues == null) { return new ArrayList<Integer>(); } ArrayList<Integer> values = new ArrayList<Integer>(intValues.length); for (int i = 0; i < intValues.length; i++) { values.add(new Integer(intValues[i])); } return values; } }