Java BigDecimal Format formatAmount(final BigDecimal number)

Here you can find the source of formatAmount(final BigDecimal number)

Description

format Amount

License

Apache License

Declaration

public static String formatAmount(final BigDecimal number) 

Method Source Code


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

import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.text.NumberFormat;

public class Main {
    public static String formatAmount(final BigDecimal number) {
        NumberFormat formatter = new DecimalFormat(".00");
        return formatter.format(number);
    }/* w  w w .j  a  va  2 s  .c om*/
}

Related

  1. format2Scale(BigDecimal obj)
  2. format2String(BigDecimal bd)
  3. format_BigDecimal(BigDecimal decimal, Integer scale)
  4. formatAmount(BigDecimal amount)
  5. formatAmount(BigDecimal amount)
  6. formatAsReadable(BigDecimal number)
  7. formatBetrag(BigDecimal bdBetrag, Locale locale)
  8. formatBigDecimal(BigDecimal bd, NumberFormat format)
  9. formatBigDecimal(BigDecimal bigDecimal)