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 Exception {

     public static void main(String[] args) {

           int d = 1;

           int c = 1 – d;

           int a = d / c;

     }

}

0%
0%
0%
100%
View this question
Основна ідеологічна мета застосування блоків операторів try/catch
0%
0%
0%
View this question

NullPointerExceprion відноситься до винятків, які не перевіряються.

100%
0%
View this question

Виберіть виняток, який говорить про неприпустиме перетворення рядка в числовий формат.

0%
0%
0%
0%
View this question

Виберіть види винятків, які існують у Java.

0%
0%
0%
0%
View this question
Checked-виняток обов'язково потрібно
0%
0%
0%
100%
View this question

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

public class Exc_2 {

       public static void main(String[] args) {

             int a, b;

            

             try {

                    a = 0;

                    b = 2 / a;

                    System.out.println("Стрічка блоку коду try");

             }catch (ArithmeticException e) {

                    System.out.println("Перехоплено та опрацьовано виключення");

             }

             System.out.println("Продовження ходу виконання програми");

       }

}

100%
0%
0%
View this question
Чи скомпілюється код, якщо ні, то чому?
100%
0%
0%
View this question

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

public class MultipleCatches {

 

       public static void main(String[] args) {

             try {

                    int a = 0;

                    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%
50%
0%
50%
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