Java Format - Java NumberFormat .getIntegerInstance (Locale inLocale)


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

public static NumberFormat getIntegerInstance(Locale inLocale)


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);

The code above generates the following result.