Java Number Parse isNumeric(final String str)

Here you can find the source of isNumeric(final String str)

Description

is Numeric

License

Open Source License

Declaration

public static boolean isNumeric(final String str) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.text.NumberFormat;

import java.text.ParsePosition;

public class Main {
    public static boolean isNumeric(final String str) {
        final NumberFormat formatter = NumberFormat.getInstance();
        final ParsePosition pos = new ParsePosition(0);
        formatter.parse(str, pos);/*from  ww  w  . ja v  a 2  s. c om*/
        return str.length() == pos.getIndex();
    }
}

Related

  1. isNumber(final String str)
  2. isNumber(String str)
  3. isNumeric(Class cls)
  4. isNumeric(String str)
  5. isNumeric(String str)
  6. isNumeric(String str)
  7. isNumeric(String value, Locale locale)