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