Here you can find the source of format(String number)
public static Double format(String number)
//package com.java2s; //License from project: Apache License public class Main { public static Double format(String number) { Double ret = null;// w w w . j a v a 2s. c om String work = number.replace(',', '.'); ret = new Double(work); return ret; } }