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