try-catch-finally statement | try{ statements } catch (exception_type1 identifier1) { statements } catch (exception_type2 identifier2) { statements ... } finally { statements } | //Any division by zero that occurs when executing the try block will result in execution of the catch block. //Once either block completes, execution continues at the statement after the catch block. try { result = numerator / denominator; validResult = true; } catch (ArithmeticException e) { validResult = false; }
| to handle exceptions | Exception Handling | | exception statement | try block, catch block(s), finally block |