Java Decimal Format toFmtDoubleStr(String doubleStr)

Here you can find the source of toFmtDoubleStr(String doubleStr)

Description

to Fmt Double Str

License

Open Source License

Declaration

public static String toFmtDoubleStr(String doubleStr) 

Method Source Code


//package com.java2s;
import java.text.DecimalFormat;

public class Main {
    private static final DecimalFormat df = new DecimalFormat("####0.00");

    public static String toFmtDoubleStr(String doubleStr) {
        return toFmtDoubleStr(Double.parseDouble(doubleStr));
    }//  www  .j a  va 2s.  c  om

    public static String toFmtDoubleStr(double d) {
        return df.format(d);
    }
}

Related

  1. toDoubleObject(Object o)
  2. toDoubOriginOutPut(double d, int digitally)
  3. toEdmDouble(double value)
  4. toFix(double x, int dp)
  5. toFixedString(Locale locale, double value, int precision)
  6. toParse(double d)
  7. toPrecision(double I, int digits1, int digits2)
  8. toScientific(double I, int digits)
  9. toSplitDecimalString(Double num, int decimal)