String number = "1234"; boolean result = StringUtils.isNumeric(number); // result will be true
String notNumber = "1234abc"; boolean result = StringUtils.isNumeric(notNumber); // result will be falseThe package library for StringUtils is: org.apache.commons.lang.