Here you can find the source of toFloatArray(java.util.List
public static float[] toFloatArray(java.util.List<Float> list, float[] res)
//package com.java2s; //License from project: Apache License public class Main { public static float[] toFloatArray(java.util.List<Float> list, float[] res) { if (res == null) res = new float[list.size()]; int i = 0; for (Float e : list) res[i++] = e.floatValue();// ww w. jav a2 s . c o m return res; } }