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...

In the Intel architecture under __________ mode, an 8086 processor is simulated in a separate protected region of memory.

a. protected b. system management c. real address d. virtual 8086

Computer Science & Information Technology

File Explorer is a program used to navigate the Internet

Indicate whether the statement is true or false

Computer Science & Information Technology

In Word, as you type your outline text, use the ____ list arrow in the Outline Tools group to apply a heading level for each line.

A. Outline box B. Outline Level C. Outline D. Outline text

Computer Science & Information Technology

When ____________________ is activated, Windows searches your computer and makes suggestions based on web results.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology