import org.apache.commons.lang.math.NumberUtils; public class MainClass { public static void main(String[] args) { //Check if a String contains only digits System.out.println("Is Digits >>> " + NumberUtils.isDigits("123.123")); } }
123456789