Java Format - 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.

//  www. j a va2 s  . 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());
  }
}

The code above generates the following result.