Java NumberFormat .isParseIntegerOnly ()

Syntax

NumberFormat.isParseIntegerOnly() has the following syntax.

public boolean isParseIntegerOnly()

Example

In the following code shows how to use NumberFormat.isParseIntegerOnly() method.


/*from  w ww .  j  a  v  a2 s  .c o  m*/
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());
  }
}




















Home »
  Java Tutorial »
    java.text »




DateFormat
DecimalFormat
NumberFormat
SimpleDateFormat