String s = "3.14"; DecimalFormat dF = new DecimalFormat("0.00"); Number num = dF.parse(s); double dbnum = num.doubleValue();