添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
I'm new here... but I'm a computer freak (more than literally ).
I am great at VB.NET... but I have a function which does not have a corresponding one in java : IsNumeric( String input).
Does anyone know how to find out whether a String is a number (int or floating-point)?
Thanks.
P.S.: Please do not tell me about Character.IsDigit - I don't want loops!
"AMD Turion",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff
Hello AMD (please change your name, see Nick's and Bear's replies above),

I don't understand why a loop would be such a problem.

But if you absolutely don't want to use a loop, you could do it using a regular expression

Lookup the API documentation of class Pattern in the package java.util.regex to understand how it works.