Java Currency Format formatCurrency(Double value)

Here you can find the source of formatCurrency(Double value)

Description

format Currency

License

Open Source License

Declaration

public static String formatCurrency(Double value) 

Method Source Code


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

public class Main {
    public static String formatCurrency(Double value) {
        String result = "0.00";
        if (value != null)
            result = new DecimalFormat(",##0.00").format(value);
        return result;
    }/*w w w  . j  a  v a2 s . c om*/
}

Related

  1. formatCurrency(double amount)
  2. formatCurrency(double amount, int precision, Locale locale)
  3. formatCurrency(double amt)
  4. formatCurrency(double num)
  5. formatCurrency(Double number)
  6. formatCurrency(final Double currencyValue, final Locale locale, final boolean isGroup)
  7. formatCurrency(Float amt)
  8. formatCurrency(Float f)
  9. formatCurrency(int amount)