find out if string can be parsed to int code example
Example: java check if able to parse int
public static boolean isParsable(String input) {
try {
Integer.parseInt(input);
return true;
} catch (final NumberFormatException e) {
return false;
}
}