import org.apache.commons.lang.math.NumberUtils; public class MainClass { public static void main(String[] args) { //Check if a String is a valid number System.out.println("Is Number >>> " + NumberUtils.isNumber("123.123")); } }
Is Number >>> true