Use `Double.parseDouble(str)` inside a `try-catch`
Use `Integer.parseInt(str)` for integer-only checks
Use `Long.parseLong(str)` for long integer checks
Use `Pattern.matches(“-?\d+(\.\d+)?”, str)` for a simple numeric regex check
Use `str.matches(“-?\d+(\.\d+)?”)` for a simple numeric regex check
Use `NumberUtils.isCreatable(str)` from Apache Commons Lang
Use `NumberUtils.isParsable(str)` from Apache Commons Lang
Use `Scanner` with `hasNextDouble()` or `hasNextInt()`
Use `Character.isDigit(ch)` for single-character digit checks
Use `BigDecimal` constructor in a `try-catch` for decimal number validation
