Here you can find the source of toFloat(String value, float _default)
public static float toFloat(String value, float _default)
//package com.java2s; //License from project: Apache License public class Main { public static float toFloat(String value, float _default) { if (value == null || value.length() == 0) return _default; return Float.valueOf(value); }// www . jav a2 s .com }