Java Double Number to String doubleToString(double value, int maximum, int minimum)

Here you can find the source of doubleToString(double value, int maximum, int minimum)

Description

double To String

License

Open Source License

Declaration

public static String doubleToString(double value, int maximum, int minimum) 

Method Source Code

//package com.java2s;

import java.text.NumberFormat;

public class Main {

    public static String doubleToString(double value, int maximum, int minimum) {
        NumberFormat nbf;/*from w ww .jav  a 2 s.  co  m*/
        nbf = NumberFormat.getNumberInstance();
        nbf.setMaximumFractionDigits(maximum);
        nbf.setMinimumFractionDigits(minimum);
        nbf.setGroupingUsed(false);
        return nbf.format(value);
    }
}

Related

  1. doubleToString(Double num)
  2. doubleToString(double val, int maxFractionDigits)
  3. doubleToString(double value)
  4. doubleToString(double value, int afterDecimalPoint)
  5. doubleToString(double value, int fractionDigits)
  6. doubleToString(double value, String format)
  7. doubleToString(final double d, final int decimalPlaces)
  8. doubleToString(final double number)
  9. doubleToSz(double dval)