Here you can find the source of toFloatArray(List
public static float[] toFloatArray(List<Double> list)
//package com.java2s; //License from project: Open Source License import java.util.Iterator; import java.util.List; public class Main { public static float[] toFloatArray(List<Double> list) { float[] array = new float[list.size()]; Iterator<Double> ints = list.iterator(); int idx = 0; while (ints.hasNext()) { Double value = ints.next(); array[idx++] = value.floatValue(); }//from w w w . j a v a 2 s.c o m return array; } }