DecimalFormat GetMinimumFractionDigits() Example
Gets the minimum number of digits allowed in the fraction portion of a number
DecimalFormatclass GetMinimumFractionDigits() method example. This example shows you how to use GetMinimumFractionDigits() method.This method Gets the minimum number of digits allowed in the fraction portion of a number
Here is the code:-
/**
* @Program that Gets the minimum number of digits allowed in the fraction
* portion of a number.
* GetMinimumFractionDigits.java
* Author:-RoseIndia Team
* Date:-12-Jun-2008
*/
import java.text.*;
public class GetMinimumFractionDigits {
public static void main(String[] args) {
// Creates a DecimalFormat object
DecimalFormat d = new DecimalFormat();
//Gets the minimum number of digits allowed in the fraction sportion of a number.
System.out.println("The minimum number of digits allowed in the fraction portion of a number is: "
+ d.getMaximumIntegerDigits());
}
} |
Output of the Program
| The minimum number of digits allowed in the fraction portion of a number is: 2147483647 |
|