Java tutorial
//package com.java2s; import java.util.List; public class Main { public static long[] toLongArray(List<Long> arrList) { long[] r = new long[arrList.size()]; for (int i = 0; i < arrList.size(); i++) { r[i] = ((Long) arrList.get(i)).longValue(); } return r; } }