Here you can find the source of toArray(float[] floatArray)
public static Object[] toArray(float[] floatArray)
//package com.java2s; //License from project: Open Source License public class Main { public static Object[] toArray(float[] floatArray) { if (floatArray == null) return null; Float[] objArray = new Float[floatArray.length]; for (int i = 0; i < floatArray.length; i++) objArray[i] = Float.valueOf(floatArray[i]); return objArray; }// w w w . ja v a 2s .c om }