Java Double Number Create toDouble(String aString)

Here you can find the source of toDouble(String aString)

Description

to Double

License

Open Source License

Declaration

public static Double toDouble(String aString) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static Double toDouble(String aString) {
        try {/*from   www.  ja v a  2 s  .  c o m*/
            double value = 0.00;
            if (aString == null || aString.trim().equals(""))
                return 0.00;
            value = Double.parseDouble(aString.trim());
            return value;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }
}

Related

  1. toDouble(Object value)
  2. toDouble(Object value, double nullValue)
  3. toDouble(Object x)
  4. toDouble(short[] arr)
  5. toDouble(short[] src)
  6. toDouble(String doubleString, Double defaultValue)
  7. toDouble(String input, double defaultValue)
  8. toDouble(String parameter)
  9. toDouble(String s)