Here you can find the source of toFloatArray(Collection extends Number> c)
public static float[] toFloatArray(Collection<? extends Number> c)
//package com.java2s; //License from project: Apache License import java.util.Collection; public class Main { public static float[] toFloatArray(Collection<? extends Number> c) { float arr[] = new float[c.size()]; int i = 0; for (Number item : c) { arr[i++] = item.floatValue(); }//from w w w. j a v a 2s . c om return arr; } }