top of page

Java

Public·4 members

Java Program to Check if a String is Numeric



String regex = "^[0-9]+$";
String str = "12"
if(str.matches(regex))
    System.out.println("Number")

50 Views
bottom of page