subject

Public class Car { public void m1() {
System. out. println("car 1");
}
â
public void m2() {
System. out. println("car 2");
}
â
public String toString() {
return "vroom";
}
}

public class Truck extends Car {
public void m1() {
System. out. println("truck 1");
}
}

And assuming that the following variables have been declared:

Car mycar = new Car();
Truck mytruck = new Truck();

What is the output from the following statements?

a. Sound F/X System. out. println(mycar);
b. mycar. m1();
c. mycar. m2();
d. System. out. println(mytruck);
e. mytruck. m1();
f. mytruck. m2();

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:10
The total cost of textbooks for the term was collected from 36 students. create a histogram for this data. $140 $160 $160 $165 $180 $220 $235 $240 $250 $260 $280 $285 $285 $285 $290 $300 $300 $305 $310 $310 $315 $315 $320 $320 $330 $340 $345 $350 $355 $360 $360 $380 $395 $420 $460 $460
Answers: 2
question
Computers and Technology, 22.06.2019 12:30
Some of the first computer games were created in the early 1970s by college students experimenting after hours to see what the were capable of doing.
Answers: 3
question
Computers and Technology, 22.06.2019 18:30
Which of these options are the correct sequence of actions for content to be copied and pasted? select content, click the copy button, click the paste button, and move the insertion point to where the content needs to be inserted. click the copy button, select the content, move the insertion point to where the content needs to be inserted, and click the paste button. select the content, click the copy button, move the insertion point to where the content needs to be inserted, and click the paste button. select the content, move the insertion point to where the content needs to be inserted, click the copy button, and click the paste button.
Answers: 3
question
Computers and Technology, 23.06.2019 02:00
Which software would you use to create a print design? a. illustrator b. audacity c. reaper d. dreamweaver
Answers: 2
You know the right answer?
Public class Car { public void m1() {
System. out. println("car 1");
}
â
pu...
Questions
question
Chemistry, 15.06.2021 23:00
question
Mathematics, 15.06.2021 23:00
question
Mathematics, 15.06.2021 23:00
question
Mathematics, 15.06.2021 23:00