Mega Code Archive
Check if given string is numeric (-+0 9( )0 9)
public class Main {
public static boolean isNumeric(String string) {
return string.matches("^[-+]?\\d+(\\.\\d+)?$");
}
public static void main(String[] args) {
sysout isNumeric("123.123")
}
}