Here you can find the source of tryParseFloat(String value)
Parameter | Description |
---|---|
value | a parameter |
public static Float tryParseFloat(String value)
//package com.java2s; //License from project: Open Source License public class Main { /**//from w w w. java 2 s . com * Try to parse the string as float or return null if failed * * @param value * @return */ public static Float tryParseFloat(String value) { try { return Float.parseFloat(value); } catch (NumberFormatException e) { return null; } } }