Question: Consider the following classes: public class Building { public void openDoor ( ) { . . . } } public class Office extends Building {

Consider the following classes: public class Building { public void openDoor(){...}} public class Office extends Building { public void turnOnLights(){..}} Assume the following code in the main method. Line 1: Office office = new Office(); Line 2: office.openDoor(); Line 3: office.turnOnLights(); Does line 2 produce a compile error? Group of answer choices True False

Step by Step Solution

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 Databases Questions!