Which blocks will be executed?

Report a typo

You have the following program:

fun division() {
    var a = 0
    try {
        a = 44 / 0
        println("The try block is executed")
    }
    catch (e: NumberFormatException) {
        println("The catch block is executed")
    }
    finally {
        println("The finally block is executed")
    }
}

fun main() {
    division()
}

Which code blocks will be executed?

Select one or more options from the list
___

Create a free account to access the full topic