Here you can find the source of listOfIntegers2ArrayOfInts(List
public static int[] listOfIntegers2ArrayOfInts(List<Integer> xs)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { public static int[] listOfIntegers2ArrayOfInts(List<Integer> xs) { int[] xa = new int[xs.size()]; for (int i = 0; i < xa.length; ++i) { xa[i] = xs.get(i);/*from w w w .j ava 2s . com*/ } return xa; } }