subject

Assume a base, base has a derived class, sub.. also, assume a method called methodx() is defined in base and overridden in sub. for simplicity, let's say the only thing this method does is to print out "base" if base's methodx() is called and "sub" if the sub's methodx() is called.

main() has these lines, in this order, exactly, (and all other lines are correct and unrelated to these) :

base b = new base();
sub s = new sub();

b = s;
s. methodx();
b. methodx();
check the true statements (there may be one or more):

a. it will print:

sub
base
b. there are no compiler errors or warnings.
c. there will be a compiler warning which is not fatal, and main() will still run.
d. it will print:

base
sub
e. it will print:

sub
sub

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:10
Which activity should be part of a long-term plan to positively affect yourhealth? oa. wearing regular clothing when handling toxinsob. not worrying about secondhand smokeoc. avoiding excessive exposure to sunlightod. drinking only well water
Answers: 1
question
Computers and Technology, 22.06.2019 18:00
Which of the following physical laws can make the flow of water seem more realistic? a. motion b. gravity c. fluid dynamics d. thermodynamics
Answers: 2
question
Computers and Technology, 23.06.2019 16:10
What is the ooh? a. omaha occupation handbook b. online occupational c. occupations online d. occupational outlook handbook select the best answer from the choices provided
Answers: 3
question
Computers and Technology, 24.06.2019 10:00
In which view can you see speaker notes?
Answers: 1
You know the right answer?
Assume a base, base has a derived class, sub.. also, assume a method called methodx() is defined in...
Questions
question
Mathematics, 04.07.2019 19:00
question
Mathematics, 04.07.2019 19:00
question
Mathematics, 04.07.2019 19:00
Questions on the website: 13722360