Here you can find the source of convertFloat(String str, float defaults)
public static float convertFloat(String str, float defaults)
//package com.java2s; //License from project: Apache License public class Main { public static float convertFloat(String str, float defaults) { if (str == null) { return defaults; }//from w w w .j a v a2 s .com try { return Float.parseFloat(str); } catch (Exception e) { return defaults; } } }