Java Double Number to String doubleToString(double dnum)

Here you can find the source of doubleToString(double dnum)

Description

double To String

License

Apache License

Declaration

public static String doubleToString(double dnum) 

Method Source Code

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

import java.text.NumberFormat;

public class Main {

    public static String doubleToString(double dnum) {
        NumberFormat numformat = NumberFormat.getNumberInstance();
        numformat.setGroupingUsed(false);
        numformat.setMinimumFractionDigits(2);
        numformat.setMaximumFractionDigits(2);
        String valueN = numformat.format(dnum);
        return valueN;
    }/*from  w w w.j a v  a  2 s.c o  m*/
}

Related

  1. doubleToStrFormatado(Double valor)
  2. doubleToString(double d)
  3. doubleToString(double d, int df)
  4. doubleToString(double d, int precision)
  5. doubleToString(Double d, String format)
  6. doubleToString(Double num)
  7. doubleToString(double val, int maxFractionDigits)
  8. doubleToString(double value)
  9. doubleToString(double value, int afterDecimalPoint)