Try-catch-finally may happen whenever an exception is raised and how the control flow occurs in each of the given cases.
- Control flow in try-catch clause OR try-catch-finally clause
- Case 1: Exception occurs in try block and handled in catch block
- Case 2: Exception occurs in try-block is not handled in catch block
- Case 3: Exception doesn't occur in try-block
- try-finally clause
- Case 1: Exception occurs in try block
- Case 2: Exception doesn't occur in try-block