Here you can find the source of toIntArray(final List
public static final int[] toIntArray(final List<Integer> pItems)
//package com.java2s; import java.util.List; public class Main { public static final int[] toIntArray(final List<Integer> pItems) { final int[] out = new int[pItems.size()]; for (int i = out.length - 1; i >= 0; i--) { out[i] = pItems.get(i);/*from w w w . jav a 2 s .c om*/ } return out; } }