Assume Cylinder is a subtype of Circle. Analyze the following code:

Circle c = new Circle (5);
Cylinder c = cy;

a. The code has a compile error.
b. The code has a runtime error.
c. The code is fine.

a You cannot assign a variable of a supertype to a subtype without explicit casting.

Computer Science & Information Technology

You might also like to view...

You CANNOT create a chart in ________

Fill in the blank(s) with correct word

Computer Science & Information Technology

Which technology typically provides security isolation in infrastructure as a service (IaaS) cloud computing?

A. Application instance B. System image repository C. Virtual machines D. Operating systems

Computer Science & Information Technology