We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
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?
Java Exception Handling (Try-catch)
You are viewing a single comment's thread. Return to all 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?