Here you can find the source of tryParseFloat(String value)
public static boolean tryParseFloat(String value)
//package com.java2s; //License from project: Open Source License public class Main { /**//from w ww. j av a 2 s .com * Returns whether or not the String can be parsed as an Float */ public static boolean tryParseFloat(String value) { try { Float.parseFloat(value); } catch (NumberFormatException ex) { return false; } return true; } }