Java String to convertStringToFloat(String str)

Here you can find the source of convertStringToFloat(String str)

Description

convert String To Float

License

Open Source License

Declaration

public static float convertStringToFloat(String str) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static float convertStringToFloat(String str) {
        float val = 0;
        if (str != null || !str.isEmpty()) {
            val = Float.parseFloat(str);
        }//  w  w  w .  j a va  2 s .c  o  m

        return val;
    }
}

Related

  1. convertStringFormat(String property)
  2. convertStringsToTextSet(String[] values)
  3. convertStringToArray(String str)
  4. convertStringToColor(String color)
  5. ConvertStringToEnumValue(String enumAsString, Class type)
  6. convertStringToId(String s)
  7. convertStringToIntDef(String string, int defaultValue)
  8. convertStringToLiteral(String className, String value)
  9. convertStringToObject(String value, Class type)