Here you can find the source of toIntArray(java.util.List
public static int[] toIntArray(java.util.List<Integer> list)
//package com.java2s; //License from project: Apache License public class Main { public static int[] toIntArray(java.util.List<Integer> list) { int[] ret = new int[list.size()]; int i = 0; for (Integer e : list) ret[i++] = e.intValue();// w ww .j a v a 2s .c o m return ret; } }