Java Parse Double parseDouble(String inStr)

Here you can find the source of parseDouble(String inStr)

Description

parse Double

License

Open Source License

Declaration

public static double parseDouble(String inStr) 

Method Source Code

//package com.java2s;
// This software is licensed under the GNU General Public License,

import java.text.NumberFormat;
import java.text.ParseException;

import java.util.Locale;

public class Main {
    private static Locale sLocale;

    public static double parseDouble(String inStr) {
        try {//from   w  w w.j  a  va2s  .  c  om
            NumberFormat nf = NumberFormat.getInstance(sLocale);
            Number n = nf.parse(inStr);
            return n.doubleValue();
        } catch (ParseException e) {
            return Double.parseDouble(inStr);
        }
    }
}

Related

  1. parseDouble(Double data)
  2. parseDouble(Object input)
  3. parseDouble(String d)
  4. parseDouble(String s, Locale locale)
  5. parseDouble(String str)
  6. parseDouble(String str)
  7. parseDouble(String stringValue)