What is the result of the compilation and execution of the following code with the parameters a = 0, b = 3?

public void divide(int a, int b) {
    try {
        int c = a / b;
    } catch (Exception e) {
        System.out.print("Exception ");
    } finally {
        System.out.println("Finally");
    }
}
Explanation
The finally block is always executed except for some exceptions. 0/3 = 0 -it does not throw an exception

Следи за CodeGalaxy

Мобильное приложение Beta

Get it on Google Play
Обратная Связь
Продолжайте изучать
тесты по Java
Cosmo
Зарегистрируйся сейчас
или Подпишись на будущие тесты