Java Number Format Pattern getNumberFormatInstanceFor2DecimalDigits()

Here you can find the source of getNumberFormatInstanceFor2DecimalDigits()

Description

get Number Format Instance For Decimal Digits

License

Open Source License

Declaration

public static NumberFormat getNumberFormatInstanceFor2DecimalDigits() 

Method Source Code

//package com.java2s;

import java.text.NumberFormat;

public class Main {
    public static NumberFormat getNumberFormatInstanceFor2DecimalDigits() {
        NumberFormat numberFormatFor2DecimalDigits = NumberFormat
                .getInstance();//from   w w w .  j  a  v  a  2 s. c om
        numberFormatFor2DecimalDigits.setMaximumFractionDigits(2);
        return numberFormatFor2DecimalDigits;
    }
}

Related

  1. getNumberFormat(final String pattern)
  2. getNumberFormat(int maximumFractionDigits)
  3. getNumberFormat(String format, Locale locale)
  4. getNumberFormat(String localeStr)
  5. getNumberFormatFromCache(Locale locale, Currency currency)
  6. getNumberFormatter()
  7. getNumberFormatter(final String format)
  8. getNumberFraction2Format(final Locale locale)
  9. getNumberOfDays(String year, String month)