Java Number Format Pattern formatValue(int value)

Here you can find the source of formatValue(int value)

Description

format Value

License

Open Source License

Declaration

public static String formatValue(int value) 

Method Source Code


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

import java.text.DecimalFormat;
import java.text.NumberFormat;

public class Main {
    public static String formatValue(int value) {
        return new DecimalFormat("#, ###").format(value);
    }/* ww  w.  j  a  va  2  s  . c o  m*/

    public static String format(int num) {
        return NumberFormat.getInstance().format(num);
    }
}

Related

  1. formatQuantity(Long quantity)
  2. formattedDuration(long pStartTime)
  3. formatThousands(String inValue)
  4. formatTime(long endTime, long startTime)
  5. formatTokens(long tokens)
  6. formatValue(Object value)
  7. formatWith6Digits(String input)
  8. getBigDecimalFromString(String numericValue, String numberFormat)
  9. getDataFormat(final boolean grouped, final boolean isFloat, int declen)