Java tutorial
//package com.java2s; // and/or modify it under the terms of the GNU General Public License import java.util.List; public class Main { public static int[] toIntArray(final List<Integer> list) { int[] ret = new int[list.size()]; int i = -1; for (Integer e : list) { ret[++i] = e.intValue(); } return ret; } }