Java convert ArrayList to double[]
Java can be very efficient sometimes… First, you need to to download the apache commons lang library, from here http://commons.apache.org/proper/commons-lang/. Then, using this function you can convert your List<>
double[] arr = ArrayUtils.toPrimitive(arrlist.toArray(new Double[arrlist.size()]))
Tags: arraylist, double, java, list, premitive
Trackback from your site.