NumberFormat IsParseIntegerOnly() Example
Returns true if this format will parse numbers as integers only.
NumberFormatclass IsParseIntegerOnly() method example. This example shows you how to use IsParseIntegerOnly() method.This method Returns true if this format will parse numbers as integers only.
Here is the code:-
/**
* @Program that Returns true if this format will parse numbers as integers only.
* IsParseIntegerOnly.java
* Author:-RoseIndia Team
* Date:-17-Jun-2008
*/
import java.text.*;
import java.util.*;
public class IsParseIntegerOnly {
public static void main(String[] args) {
//Creating Numberformat instance
NumberFormat nf = NumberFormat.getInstance();
System.out.println("Parse numbers as integers only: "+nf.isParseIntegerOnly());
}
} |
Output of the program:-
| Parse numbers as integers only: false |
|