Java DecimalFormat .getMaximumFractionDigits ()
Syntax
DecimalFormat.getMaximumFractionDigits() has the following syntax.
public int getMaximumFractionDigits()
Example
In the following code shows how to use DecimalFormat.getMaximumFractionDigits() method.
import java.text.DecimalFormat;
/*w ww. ja va 2 s. com*/
public class Main {
public static void main(String[] argv) throws Exception {
DecimalFormat format = new DecimalFormat();
System.out.println(format.getMaximumFractionDigits());
}
}
The code above generates the following result.