Here you can find the source of tryParseFloat(String floatValue)
private static Object tryParseFloat(String floatValue)
//package com.java2s; //License from project: Open Source License public class Main { private static Object tryParseFloat(String floatValue) { Object parsedValue;//from w w w.ja v a 2s. co m try { parsedValue = Float.parseFloat(floatValue); } catch (NumberFormatException nfe) { parsedValue = floatValue; } return parsedValue; } }