Java Number Format Pattern stringFormat(BigDecimal value)

Here you can find the source of stringFormat(BigDecimal value)

Description

string Format

License

Apache License

Declaration

public static String stringFormat(BigDecimal value) 

Method Source Code


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

import java.math.BigDecimal;

import java.text.DecimalFormat;

public class Main {
    public static String stringFormat(BigDecimal value) {
        DecimalFormat df = new DecimalFormat("#0.00");
        return df.format(value);
    }//from w  w w . j a v  a 2  s  .c o m
}

Related

  1. objectToString(Object obj, DecimalFormat fmt)
  2. print(float[] array, NumberFormat nf)
  3. resetDecimalFormat()
  4. resetDecimalFormatByLocale(Locale locale)
  5. roundNumber(Number number, DecimalFormat format)
  6. stringToReais(String unformatted, boolean comSimbolo)
  7. strToFormatedNumber(String str)
  8. toAccountantFormat(String str, int scale)
  9. toDecimalFormat(BigDecimal value)