Here you can find the source of toIntArray(List
public static int[] toIntArray(List<Integer> list)
//package com.java2s; //License from project: LGPL import java.util.*; public class Main { public static int[] toIntArray(List<Integer> list) { int[] t = new int[list.size()]; for (int i = 0; i < t.length; i++) t[i] = list.get(i);/*w w w . j ava2 s. c o m*/ return t; } }