Check a character in a String is number or not in Java
All you need is this simple function in java.lang package.
Character.isDigit(c) |
Of course, if want to check a character in a string, need to get the char first by using the following.
str.charAt(i) |
<pre><code> String foo = "bar"; </code></pre>
-
Apurv Dubey
-
Abdul Shameer