Question: Which variable declaration is the first line not to compile? A. b3 B. h2 C. b4 D. h3 E. All of the lines compile. }

Which variable declaration is the first line not to compile? 

} public class Complex { class Building {} class House extends Building

A. b3

B. h2

C. b4

D. h3

E. All of the lines compile.

} public class Complex { class Building {} class House extends Building {} public void convert() { Building bl= new Building(); House h1 = new House(); Building b2 = new House(); Building b3 (House) b1; House h2= (Building) h1; Building b4 = (Building) b2; House h3 (House) b2; } =

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To determine which variable declaration does not compile lets look at each line individually 1 Build... View full answer

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