Here you can find the source of toIntArray(List
private static int[] toIntArray(List<String> values)
//package com.java2s; import java.util.List; public class Main { private static int[] toIntArray(List<String> values) { int[] is = new int[values.size()]; for (int i = 0; i < is.length; i++) { is[i] = Integer.parseInt(values.get(i)); }/*ww w . ja v a 2s. c o m*/ return is; } }