Java NumberFormat .getIntegerInstance (Locale inLocale)

Syntax

NumberFormat.getIntegerInstance(Locale inLocale) has the following syntax.

public static NumberFormat getIntegerInstance(Locale inLocale)

Example

In the following code shows how to use NumberFormat.getIntegerInstance(Locale inLocale) method.


//from w  w  w  .ja  v a  2s  .c  o m
import java.text.NumberFormat;
import java.util.Locale;

public class Main {
  public static void main(String[] args) throws Exception {
    NumberFormat numberFormat = NumberFormat.getIntegerInstance(Locale.CANADA);
    System.out.println(numberFormat.getMaximumFractionDigits());
  }
}




















Home »
  Java Tutorial »
    java.text »




DateFormat
DecimalFormat
NumberFormat
SimpleDateFormat