Here you can find the source of convertStringToFloat(String str)
public static float convertStringToFloat(String str)
//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; } }