Multiple Choice Question

Quiz Guidelines

 

QID: 
214
Question: 

Given the following class definitions :

interface MyIface{};
class A {};
class B extends A implements MyIface{};
class C implements MyIface{};

and the following object instantiations:

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

Which of the following assignments are legal at compile time?

Select 1 option

A. b = c;
B. c = b; 
C. MyIface i = c; 
D. c = (C) b; 
E. b = a;

Q&A Set: 

Search the Web

Custom Search

Searches whole web. Use the search in the right sidebar to search only within javajee.com!!!