Java Double Number Create toDouble(String str)

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

Description

toDouble

License

Apache License

Declaration

public static double toDouble(String str) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    /**/*  w  w w  .ja va  2s .  c om*/
     * toDouble 
     */
    public static double toDouble(String str) {
        double dval = 0.0;
        if (str == null || str.equalsIgnoreCase("null") || str.equalsIgnoreCase("") || str.equalsIgnoreCase("0"))
            return 0.00;
        // double
        dval = Double.parseDouble(str.trim());
        return dval;
    }
}

Related

  1. toDouble(String s)
  2. toDouble(String s)
  3. toDouble(String s)
  4. toDouble(String s)
  5. toDouble(String str)
  6. toDouble(String str)
  7. toDouble(String str)
  8. toDouble(String str)
  9. toDouble(String str)