Here you can find the source of parseNumber(String number)
public static double parseNumber(String number) throws ParseException
//package com.java2s; // modify it under the terms of the GNU General Public License import java.text.NumberFormat; import java.text.ParseException; public class Main { private static NumberFormat NUMBER_PARSE = NumberFormat.getNumberInstance(); public static double parseNumber(String number) throws ParseException { synchronized (NUMBER_PARSE) { return NUMBER_PARSE.parse(number.trim()).doubleValue(); }//w ww . ja v a 2s .co m } }