Java Float Array Create toFloatArray(Object[] arr)

Here you can find the source of toFloatArray(Object[] arr)

Description

to Float Array

License

Apache License

Declaration

public static float[] toFloatArray(Object[] arr) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {

    public static float[] toFloatArray(Object[] arr) {
        float[] arr2 = new float[arr.length];
        for (int i = 0; i < arr.length; i++) {
            arr2[i] = Float.parseFloat(String.valueOf(arr[i]));
        }/*  w w w .  j  a  v a  2  s. c  o  m*/
        return arr2;
    }
}

Related

  1. toFloatArray(final byte[] array)
  2. toFloatArray(final double[] doubleArray)
  3. toFloatArray(final Object[] array)
  4. toFloatArray(Float[] data)
  5. toFloatArray(Number[] array)
  6. toFloatArray(String str, String separator)
  7. toFloatArray(String text, String delim)
  8. toFloatArray(String[] anArray)
  9. toFloatArrays(double[][] arrays)