Question: class Circle { } ; class Cylinder extends Circle { } ; class Cone extends Circle { } Cylinder cy = new Cylinder ( )

class Circle {};
class Cylinder extends Circle {};
class Cone extends Circle {}
Cylinder cy = new Cylinder ();
Cone co = new Cone ();
Circle c2;
Cylinder cy2;
Cylinder cy3;
c2= co; //line 1
cy2= c2; //line 2
cy2=(Cylinder) c2; //line 3
Study the whole code above and determine which of . the following statements is true about the three lines above.

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!