Java Double to String doubleToString4(double value)

Here you can find the source of doubleToString4(double value)

Description

double To String

License

Open Source License

Declaration

public static String doubleToString4(double value) 

Method Source Code

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

public class Main {
    public static String doubleToString4(double value) {
        if (Double.isNaN(value)) {
            return " --- ";
        }//from   www .  j ava 2s. com
        return String.format("%.4f", value);
    }
}

Related

  1. doubleToString(final double d)
  2. doubleToString(final double v, final int roundingDigits)
  3. doubleToString(final Double value)
  4. doubleToString(final Double value)
  5. doubleToString(final double value, final boolean stripDotZero)
  6. doubleToStringWithMinimumPrecision(double d)