Java Number Format Pattern formatNumber(int source)

Here you can find the source of formatNumber(int source)

Description

format Number

License

Open Source License

Parameter

Parameter Description
source a parameter

Declaration

public static String formatNumber(int source) 

Method Source Code

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

import java.text.DecimalFormat;

public class Main {
    /**/*  w w w.j ava  2 s  .c om*/
     * @param source
     * @return
     */
    public static String formatNumber(int source) {
        String pattern = "###,###";
        DecimalFormat decimalFormat = new DecimalFormat(pattern);

        String format = decimalFormat.format(source);

        return format;
    }
}

Related

  1. formatIntoCurr(String str_number, int digits)
  2. formatLong(long value)
  3. formatNumber(final long number)
  4. formatNumber(final long number)
  5. formatNumber(int num)
  6. formatNumber(long number)
  7. formatNumber(long number)
  8. formatNumber(Number num)
  9. formatNumber(Number number)