Java Number Format Pattern getFormattedNumber(int number)

Here you can find the source of getFormattedNumber(int number)

Description

get Formatted Number

License

Open Source License

Declaration

public static String getFormattedNumber(int number) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.text.DecimalFormat;

public class Main {
    private static DecimalFormat formatter = new DecimalFormat("###,###");

    public static String getFormattedNumber(int number) {
        return formatter.format(number);
    }//from  w w w  .j a v a 2s  . com
}

Related

  1. getFormat(int decimals)
  2. getFormat(int nbDecimale)
  3. getFormatedInt(int maxValue)
  4. getFormatedPrice(BigDecimal price)
  5. getFormattedInteger(int n)
  6. getFormattedNumber(NumberFormat numberFormat, String fieldValue, Class valueClass)
  7. getFormattedNumber(String input)
  8. getFormattedQuantity(String qty, int len, String pad)
  9. getFormattedString4Digits(String number, String pattern)