Question: Given the following classes and their objects: interface C 1 { } class C 2 implements C 1 { } class C 3 implements C
Given the following classes and their objects:
interface C
class C implements C
class C implements C
Analyze the following statement:
cCC c;
Group of answer choices
You will get a runtime error because you cannot cast objects from sibling subtypes.
c is cast into c successfully.
You will get a runtime error because the Java runtime system cannot perform multiple casting in nested form.
The statement is correct.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
