Java Parse Double parseDouble(String str)

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

Description

parse Double

License

Open Source License

Declaration

public static Double parseDouble(String str) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.text.DecimalFormat;

public class Main {

    public static Double parseDouble(String str) {
        try {// ww  w.  j  a v a 2  s.c  om
            DecimalFormat df = new DecimalFormat("#,##0.0#");
            return Double.valueOf(String.valueOf(df.parseObject(str)));
        } catch (Exception e) {
            return new Double(0.0);
        }
    }
}

Related

  1. parseDouble(Double data)
  2. parseDouble(Object input)
  3. parseDouble(String d)
  4. parseDouble(String inStr)
  5. parseDouble(String s, Locale locale)
  6. parseDouble(String str)
  7. parseDouble(String stringValue)
  8. parseDouble(String value)
  9. ParseDoubleEx(String s, double value_if_fault)