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