Java Locale Format formatIntWithCommas(int num)

Here you can find the source of formatIntWithCommas(int num)

Description

format Int With Commas

License

LGPL

Declaration

public static String formatIntWithCommas(int num) 

Method Source Code


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

import java.text.NumberFormat;
import java.util.Locale;

public class Main {
    public static String formatIntWithCommas(int num) {
        return NumberFormat.getNumberInstance(Locale.US).format(num);
    }//ww  w.j av  a 2s  .  co  m
}

Related

  1. formatInCurrentDefaultLocale(double d)
  2. formatingDecimalNumber(Object obj, Locale locale, int maxIntPart, int maxFloatPart)
  3. formatInt(final int number)
  4. formatInteger(int input)
  5. formatInteger(Long num)
  6. formatLines(String target, int maxLength, Locale currentLocale)
  7. formatLocaleDate(final java.util.Date date)
  8. formatLocaleTime(long time, Locale locale)
  9. formatMailDate(Date date)