Here you can find the source of parseDouble(String str)
public static double parseDouble(String str) throws NumberFormatException
//package com.java2s; //License from project: Open Source License import java.text.NumberFormat; import java.text.ParseException; import java.util.Locale; public class Main { public static double parseDouble(String str, Locale locale) throws NumberFormatException { double val; try {/*from ww w . ja va 2s. c om*/ val = Double.parseDouble(str); } catch (NumberFormatException ex) { try { NumberFormat numberFormat = NumberFormat.getInstance(locale); val = numberFormat.parse(str).doubleValue(); } catch (ParseException e) { throw new NumberFormatException(e.getMessage()); } } return val; } public static double parseDouble(String str) throws NumberFormatException { return parseDouble(str, Locale.getDefault()); } }