看看jdk 啊,转换成 double 型

解决方案 »

  1.   

    输入值转为double型
    下面是JDK中的原文
    parseDouble
    public static double parseDouble(String s)
                              throws NumberFormatExceptionReturns a new double initialized to the value represented by the specified String, as performed by the valueOf method of class Double. Parameters:
    s - the string to be parsed. 
    Returns:
    the double value represented by the string argument. 
    Throws: 
    NumberFormatException - if the string does not contain a parsable double.
    Since: 
    1.2