logo

Crowdly

Browser

Add to Chrome

Програмування мовою Java

Looking for Програмування мовою Java test answers and solutions? Browse our comprehensive collection of verified answers for Програмування мовою Java at moodle.chnu.edu.ua.

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

Що буде виведено на екран в результаті виконання наступного фрагмента програми?

class A {

...

}

class B extends A {

...

}

class C extends B {

...

}

public class MyClass {

public static void main (String args []) {

A x1 = new A ();

B x2 = new B ();

C x3 = new C ();

x1 = x3;

x2 = x3;

System.out.println (! X1.equals (x2));

}

}

View this question
Нижче наведено кілька варіантів запису модуля компіляції. Який з них коректний, якщо передбачається описати клас

abc.Point з пакета test.demo , причому клас активно використовує класи ua.additional.abc

і кілька класів з пакета java.net ?

(Java)

View this question
Як необхідно змінити програму, щоб доступ до елементів класу A мали тільки його прямі спадкоємці всередині і поза пакетом newpack?

1 package newpack;

2 class A {

3 int a, b;

4 void sum () {

5 System.out.print (a + b);

6}

7}

8 class B extends A {

9 ...

10}

11 ...

View this question

Що буде виведено на екран в результаті роботи наступної програми? class Square { int s (int a, int b) {return a * b; } double s (double a, double b) {return a * b; } } public class MyClass { public static void main (String args []) { Square x = new Square (); int a = 1; double b = 2; System.out.print (xs (a, b + a)); System.out.print (xs (a ++, a));

0%
25%
0%
View this question
Що буде виведено на екран в результаті роботи наступного фрагмента програми?

int a = 8, i = -1;

int i = 4;

while (i <5) {

try {

if (i> = 2)

System.out.print (12 / i);

else {

System.out.print (6 / ++ i);

throw new ArithmeticException ( "newEx");

}

}

catch (ArithmeticException e) {

System.out.print ( "0");

break;

}

i--;

}

View this question

Вкажіть правильні варіанти оголошення методу. (Java)

View this question
Яке твердження щодо приведення масивів вірно?

(Java)

0%
50%
0%
View this question
Які твердження щодо методу hashCode вірні?

(Java)

View this question
Для чого можна використовувати java.util.Collections ?

(Java)

View this question
Яка кодування використовується класом OutputStreamWriter за замовчуванням?

(Java)

View this question

Want instant access to all verified answers on moodle.chnu.edu.ua?

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

Browser

Add to Chrome