Java Format - Java DecimalFormat .getGroupingSize ()








Syntax

DecimalFormat.getGroupingSize() has the following syntax.

public int getGroupingSize()

Example

In the following code shows how to use DecimalFormat.getGroupingSize() method.

// www.  j ava 2 s.  co  m
import java.text.DecimalFormat;

public class Main {
  public static void main(String[] argv) throws Exception {
    DecimalFormat format = new DecimalFormat();
    
    System.out.println(format.getGroupingSize());

  }
}

The code above generates the following result.