Assume Cylinder is a subtype of Circle. Analyze the following code:
```
Cylinder cy = new Cylinder(1, 1);
Circle c = cy;
```
a. The code has a compile error.
b. The code has a runtime error.
c. The code is fine.
c. The code is fine.
You can assign a variable of a subtype to a supertype.
Computer Science & Information Technology
You might also like to view...
What type of printer produces the highest quality text?
a.Laser b.Dye-sublimation c.Inkjet d.Thermal
Computer Science & Information Technology
For Telnet and SSH users, which of the following commands will allow the terminal user to receive the log messages?
A) logging monitor B) terminal monitor C) logging console D) enable logging
Computer Science & Information Technology