NumberFormat.isParseIntegerOnly() has the following syntax.
public boolean isParseIntegerOnly()
In the following code shows how to use NumberFormat.isParseIntegerOnly() method.
// w w w. j a v a2 s . com import java.text.NumberFormat; import java.util.Locale; public class Main { public static void main(String[] args) throws Exception { NumberFormat numberFormat = NumberFormat.getPercentInstance(Locale.CANADA); System.out.println(numberFormat.isParseIntegerOnly()); } }
The code above generates the following result.