Intermediate Kotlin
Q63 / 100

How do you handle exceptions in Kotlin?

Correct! Well done.

Incorrect.

The correct answer is B) With try-catch-finally; all exceptions are unchecked in Kotlin

B

Correct Answer

With try-catch-finally; all exceptions are unchecked in Kotlin

Explanation

Kotlin has no checked exceptions. try-catch is used but not enforced by the compiler. runCatching is a functional alternative returning Result.

Progress
63/100