Java Format - Java DecimalFormat .getMinimumFractionDigits ()








Syntax

DecimalFormat.getMinimumFractionDigits() has the following syntax.

public int getMinimumFractionDigits()

Example

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

import java.text.DecimalFormat;
/*from  w w w .  j a va  2  s.  c o  m*/
public class Main {
  public static void main(String[] argv) throws Exception {
    DecimalFormat format = new DecimalFormat();
    
    System.out.println(format.getMinimumFractionDigits());

  }
}

The code above generates the following result.