You've successfully subscribed to The Poor Coder | Hackerrank Solutions
Great! Next, complete checkout for full access to The Poor Coder | Hackerrank Solutions
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.
Enable dark mode
Java Exception Handling (Try-catch)
Hackerrank Java Exception Handling (Try-catch) Solution
Exception handling is the process of responding to the occurrence, during computation, of exceptions – anomalous or exceptional conditions requiring special processing – often changing the normal flow of program execution. (Wikipedia) Java has built-in mechanism to handle exceptions. Using the try statement we can test a block of code for errors.