Question: A class named Building has a public, nonstatic method named getFloors(). If School is a child class of Building, and modelHigh is an object of

A class named Building has a public, nonstatic method named getFloors(). If School is a child class of Building, and modelHigh is an object of type School, which of the following statements is valid?
a. Building.getFloors();
b. School.getFloors();
c. modelHigh.getFloors();
d. All of the previous statements are valid.

Step by Step Solution

3.56 Rating (163 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Java Programming Questions!