Here you can find the source of toFloat(String value)
public static Float toFloat(String value)
//package com.java2s; //License from project: Open Source License public class Main { public static Float toFloat(String value) { if (null == value) { return null; }//www. ja v a2 s . co m value = value.trim(); if ("null".equals(value)) { return null; } return Float.parseFloat(value); } public static Float toFloat(Object value) { if (null == value) { return null; } return toFloat(String.valueOf(value)); } }