Java Float Number Parse tryParseFloat(String floatValue)

Here you can find the source of tryParseFloat(String floatValue)

Description

try Parse Float

License

Open Source License

Declaration

private static Object tryParseFloat(String floatValue) 

Method Source Code

//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;
    }
}

Related

  1. readFloatFromString(String inStr)
  2. string2float(String arg, Locale loc)
  3. tryParseFloat(String value)
  4. tryParseFloat(String value)
  5. tryParseFloats(String[] in)