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. The code has a compile error.
You cannot assign a variable of a supertype to a subtype without explicit casting.
You might also like to view...
Your coworker is struggling with adding a drop shadow to a text frame. When the drop shadow option is selected, the shadow appears on the type, but not behind the text frame. What advice would you give her?
What will be an ideal response?
Which statement is false?
a. An enum declaration is a comma-separated list of enum constants and may optionally include other components of traditional classes, such as constructors, fields and methods. b. Any attempt to create an object of an enum type with operator new results in a compilation error. c. An enum constructor cannot be overloaded. d. enum constants are implicitly final and static.
Convergence is ___
a. When a router obtains a clear view of the routes in a network. b. A numeric measure assigned to routes for ranking the routes best to worst; the smaller the number, the better. c. A procedure in the protocol that enables routers to use any of the multiple data paths available from multiple routers to reach the destination. d. A procedure in the protocol that determines the best route.
Explain what a green circle on the left side of the status bar of a document indicates.
What will be an ideal response?