✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Результат компіляції програми:
public class MultipleCatches {
public static void main(String[] args) {
try {
int a = 1;
int b = 2 / a;
int c[] = new int [1];
c[2] = 5;
} catch (ArithmeticException e) {
System.out.println("Ділення на нуль: ");
} catch (ArrayIndexOutOfBoundsException e) {
System.out.println("Помилка індексації за межами масиву: ");
}
System.out.println("Після блоку операторів try/catch");
}
}