logo

Crowdly

Browser

Add to Chrome

Об'єктно-орієнтоване програмування

Looking for Об'єктно-орієнтоване програмування test answers and solutions? Browse our comprehensive collection of verified answers for Об'єктно-орієнтоване програмування at virt.ldubgd.edu.ua.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

Результат компіляції програми:

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");

       }

}

0%
0%
100%
0%
View this question
Всі виняткові ситуації типу RuntimeException належать до категорії винятків, що перевіряються.
50%
50%
View this question
На які категорії поділяються всі винятки в Java?

100%
0%
0%
View this question

Результат компіляції програми:

public class FinallyDemo {

       static void A() {

             try {

                    System.out.println("В тілі методу A()");

             } finally {

                    System.out.println("Виконання finally в методі A()");

             }

       }

       static void B() {

             try {

                    System.out.println("В тілі методу В()");

                    return;

             } finally {

                    System.out.println("Виконання finally в методі B()");

             }

       }

       public static void main(String[] args) {

             A();

             B();

       }

}

0%
0%
0%
0%
View this question

Для чого служить блок оператора try під час опрацювання виключень?

0%
0%
0%
100%
View this question
Які ключові оператори застосовую в Java для опрацювання виключень?
50%
50%
0%
0%
View this question
Скільки блоків catch може бути в одного try?
100%
0%
0%
0%
View this question

Для чого служить блок оператора catch під час опрацювання виключень?

100%
0%
0%
0%
View this question

Що буде результатом виконання коду?
0%
0%
0%
0%
View this question

Що буде результатом виконання коду?
View this question

Want instant access to all verified answers on virt.ldubgd.edu.ua?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome