Multiple Choice Question

Quiz Guidelines



Consider the following classes :

interface I{
class A implements I{
class B extends A {
class C extends B{

And the following declarations:

A a = new A();
B b = new B();

Identify options that will compile and run without error.

Select 1 option

A. a = (B)(I)b;
B. b = (B)(I) a;
C. a = (I) b;
D. I i = (C) a;

Q&A Set: