Java Exception Handling (Try-catch)

  • + 14 comments

    Suggestion: Make the fourth testcase less strict. I had my catch outting...
    java.util.InputMismatchException: For input string: "2147483648"
    When it expected...
    java.util.InputMismatchException
    I simply made another catch for that specific exception and output "java.util.InputMismatchException" directy to work around it but I feel like that shouldn't be necessary. Unless simply printing out the Exception directly is the wrong way to go about it?