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

       double a;

 

       One(double a) {

             this.a = a;

       }

 

       double volume(double b) {

             double c = Math.pow(a, b);

             return c;

       }

}

 

public class OneMain {

 

       public static void main(String[] args) {

             One one = new One(5);

             one.volume(2);

       }

}

View this question

Зазначте помилку компіляції частини

програмного коду, що передбачає використання методу із параметрами динамічної

довжини з наступним оголошенням:

int doIt (int a, int b, int ...vals, double ...c)

View this question

Визначені в методі змінні, які приймають значення під час виклику методу

на виконання  - це?

0%
0%
0%
0%
View this question

Вкажіть помилку компіляції коду:

int method () {

           double a = 5;

           double b = (int)a*5;

           return b;

}

View this question

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

public class One {

       void meth (int i, int j){

             i = i * 2;

             j = j / 2;

       }

}

 

public class OneMain {

 

       public static void main(String[] args) {

             One one = new One();

      

             int a = 2, b = 4;

             System.out.println(a + " " + b);

 

             one.meth(a, b);

             System.out.println(a + " " + b);

       }

}

0%
0%
0%
0%
View this question

Які типи даних можливо передавати методам в

якості параметрів?

0%
0%
0%
View this question

Результат

компіляції програмного коду:

public class One {

       int a, b;

 

       One(int i, int j) {

             a = i;

             b = j;

       }

 

       void meth(One o) {

             o.a *= 2;

             o.b /= 2;

       }

}

 

public class OneMain {

 

       public static void main(String[] args) {

             One one = new One(2, 4);

      

             System.out.println(one.a + " " + one.b);

 

             one.meth(one);

             System.out.println(one.a + " " + one.b);

       }

}

0%
0%
0%
0%
View this question

Обєкт – це?

View this question

Призначення конструктора в Java

0%
0%
0%
0%
View this question

Роль оператора new стрічці: Fire myfire = new Fire();

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