logo

Crowdly

Browser

Add to Chrome

Дано: class Toy { public void printName() { System.out.println("Toy"); ...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Дано:

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%
More questions like this

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