Here you can find the source of asList(int... data)
public static Collection<Integer> asList(int... data)
//package com.java2s; /* Copyright 2004 - 2008 Kasper Nielsen <kasper@codehaus.org> * Licensed under the Apache 2.0 License. */ import java.util.ArrayList; import java.util.Collection; public class Main { public static Collection<Integer> asList(int... data) { ArrayList<Integer> list = new ArrayList<Integer>(data.length); for (int i : data) list.add(i);//from w w w.j a v a 2s . co m return list; } }