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));
}
}
abc.Point з пакета test.demo , причому клас активно використовує класи ua.additional.abc
і кілька класів з пакета java.net ?
(Java)
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 ...
Що буде виведено на екран в результаті роботи наступної програми? 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));
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--;
}
Вкажіть правильні варіанти оголошення методу. (Java)
(Java)
(Java)
(Java)
(Java)