Given the following classes and their objects:

```
class C1 {};
class C2 extends C1 {};
class C3 extends C1 {};

C2 c2 = new C2();
C3 c3 = new C3();
```
Analyze the following statement:
c2 = (C2)((C1)c3);
a. c3 is cast into c2 successfully.
b. You will get a runtime error because you cannot cast objects from sibling classes.
c. You will get a runtime error because the Java runtime system cannot perform multiple casting in nested form.
d. The statement is correct.


b. You will get a runtime error because you cannot cast objects from sibling classes.

Computer Science & Information Technology

You might also like to view...

Discuss the phased approach used in the DM stage of Kimball’s Business Dimensional Lifecycle.

What will be an ideal response?

Computer Science & Information Technology

The statement System.out.printf("%5d", 123456) outputs ___________.

a. 12345 b. 23456 c. 123456 d. 12345.6

Computer Science & Information Technology

The _________ inside a computer delivers electricity to the computer via a power cord. A. power bank B. power supply C. power adapter D. power filter

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

Computer Science & Information Technology

The replacing of your reality with a different, digitally constructed, reality is known as virtual reality.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology