Руководство по исключениям в Java

Оператор try-catch-finally

1/20

Дано:

public class Test {
    static String str = "";

    public static void main(String[] args) {
        try {
            str += "a";
            throw new Exception();
        } catch (Exception e) {
            str += "b";
        } finally {
            str += "c";
            method1();
            str += "d";
        }
        System.out.println(str);
    }

    static void method1() {
        int y = 8 / 0;
    }
}

Каков результат?

Comments