Validating number in java
*/ public static boolean is SSNValid(String ssn)/** is Numeric: Validate a number using Java regex.
* This method checks if the input string contains all numeric characters. Number to validate * @return boolean: true if the input is all numeric, false otherwise.
If the conversion was successful, the method returns the result in the correct type.
If the conversion failed, the code outputs and error message and requests the user to re-enter a proper input.