get Primitive float array from Array of Float objects - Java java.lang

Java examples for java.lang:float Array

Description

get Primitive float array from Array of Float objects

Demo Code



public class Main{

    public static float[] getPrimitiveArrayFloat(Float[] array) {
        float[] primitive = new float[array.length];

        for (int i = 0; i < array.length; ++i)
            primitive[i] = array[i];//from   w  ww  .ja  va2s.c o m

        return primitive;
    }
}

Related Tutorials