java check if string is number

Java
try {
    int n = Integer.parseInt(str);
} catch (NumberFormatException e) {
    // str is not a number
}public static boolean isCreatable(String str)
Source

Also in Java: