logo

Crowdly

Browser

Add to Chrome

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

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

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

Ви можете отримати доступ до суперкласу з підкласу, використовуючи ключове слово super .
100%
0%
View this question
Чи можна змінити тип, що повертається в перевизначеному методі?
0%
0%
View this question
Чи можуть конструктори бути перевантажені?
100%
0%
View this question
Який результат виконання коду?

class Animal {

protected int legs;

public void eat() {

System.out.println("Animal eats");

}

}

class Dog extends Animal {

Dog(){

legs = 4;

}

}

class MyClass {

public static void main(String[ ] args){

Dog d = new Dog();

d.eat();

}

}

0%
0%
100%
View this question
Дано:

class Toy {

public void printName() {

System.out.println("Toy");

}

}

class Doll extends Toy {

public String printName() {

System.out.println("Doll");

return "Doll";

}

}

public class TestToys {

public static void main(String[] args) {

Toy doll = new Doll();

doll.printName();

}

}

Який результат?

0%
0%
0%
View this question
Розмір масиву можна змінити після його створення.
0%
100%
View this question
При створенні порожнього масиву елементів присвоюються значення залежно від типу даних масиву.

Зіставте наступні типи з їх значеннями по замовчуванню

View this question
Масив – це змінна, у яку можна покласти не одне, а відразу кілька значень.
0%
0%
View this question
Що має бути на місці пропуску:

int[] myArray = _____ int[3];

0%
0%
0%
View this question
Усі елементи масиву мають однаковий тип.
100%
0%
View this question

Want instant access to all verified answers on vns.lpnu.ua?

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

Browser

Add to Chrome