Here you can find the source of toFloatArray(List
public static float[] toFloatArray(List<Float> list)
//package com.java2s; //License from project: Open Source License import java.util.List; public class Main { public static float[] toFloatArray(List<Float> list) { try {//from w w w. ja v a 2s . c om float[] ret = new float[list.size()]; for (int i = 0; i < ret.length; i++) { ret[i] = list.get(i).floatValue(); } return ret; } catch (NullPointerException e) { return null; } } }