Java tutorial
//package com.java2s; import java.util.ArrayList; public class Main { public static int[] buildIntArray(ArrayList<Integer> integerList) { int[] intArray = new int[integerList.size()]; int i = 0; for (Integer j : integerList) { intArray[i++] = j; } return intArray; } }