Question
Question 3: What's the difference between `try-catch` and `try-catch-finally` in Kotlin?
Asked by: USER8217
88 Viewed
88 Answers
Answer (88)
The `try-catch` block handles exceptions during the execution of a `try` block. The `try-catch-finally` block handles exceptions both during the execution of a `try` block and after the `try` block completes, ensuring resources are released even in case of errors.