Here you can find the source of listToIntArray(ArrayList list)
public static int[] listToIntArray(ArrayList list)
//package com.java2s; //License from project: LGPL import java.util.*; public class Main { public static int[] listToIntArray(ArrayList list) { int size = list.size(); int[] result = new int[size]; //for (int i = size-1; i >= 0; i--) { for (int i = 0; i < size; i++) { result[i] = ((Integer) list.get(i)).intValue(); //////System.out.println(" }/*www . j a v a2 s .co m*/ return result; } }