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

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback