Here you can find the source of asArray(List
private static int[] asArray(List<Integer> indices)
//package com.java2s; // it under the terms of the GNU General Public License as published by // import java.util.*; public class Main { private static int[] asArray(List<Integer> indices) { int[] _indices = new int[indices.size()]; for (int i = 0; i < indices.size(); i++) _indices[i] = indices.get(i); return _indices; }/*w w w. j a va 2 s . c o m*/ }