String regex = "^[0-9]+$";
String str = "12"
if(str.matches(regex))
System.out.println("Number")
top of page
To see this working, head to your live site.
Java Program to Check if a String is Numeric
Java Program to Check if a String is Numeric
0 comments
Like
Comments
bottom of page