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