Java Fraction Format formatDouble(double d)

Here you can find the source of formatDouble(double d)

Description

format Double

License

Open Source License

Declaration

public static String formatDouble(double d) 

Method Source Code


//package com.java2s;
/*/*from  w w w.  j ava  2s.  c o m*/
 * train-j is free software; you can redistribute it and/or modify it under the
 * terms of the GNU General Public License as published by the Free Software
 * Foundation; either version 2 of the License, or (at your option) any later
 * version.
 */

import java.text.DecimalFormat;
import java.text.NumberFormat;

public class Main {
    static NumberFormat nf = new DecimalFormat("0.00000");

    public static String formatDouble(double d) {
        String x = nf.format(d);
        // String x = shadeDouble(d, 1);
        return x;

    }
}

Related

  1. formatDoube(double val)
  2. formatDouble(DecimalFormat fmt, double value)
  3. formatDouble(Double amount, String format)
  4. formatDouble(double aValue)
  5. formatDouble(double d)
  6. formatDouble(Double d)
  7. formatDouble(Double d)
  8. formatDouble(double d)
  9. formatDouble(double d)