Here you can find the source of asList(int[] ints)
public static List asList(int[] ints)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.List; public class Main { public static List asList(int[] ints) { List list = new ArrayList(); for (int i = 0; i < ints.length; i++) { list.add(i, ints[i]);//from w w w . ja v a2 s. c om } return list; } public static List asList(String[] var1) { List list = new ArrayList(); for (int i = 0; i < var1.length; i++) { list.add(i, var1[i]); } return list; } public static List asList(boolean[] var1) { List list = new ArrayList(); for (int i = 0; i < var1.length; i++) { list.add(i, var1[i]); } return list; } public static List asList(float[] var1) { List list = new ArrayList(); for (int i = 0; i < var1.length; i++) { list.add(i, var1[i]); } return list; } public static List asList(Object[] var1) { List list = new ArrayList(); for (int i = 0; i < var1.length; i++) { list.add(i, var1[i]); } return list; } }