Incorrect assignments

Report a typo

You have a class hierarchy including a base class and two derived classes.

public class A { }

public class B extends A { }

public class C extends A { }

Select all incorrect assignments.

A a1 = new C(); // (1)
A a2 = new A(); // (2)

B b1 = new A(); // (3)
B b2 = new B(); // (4)
B b3 = new C(); // (5)

C c1 = new A(); // (6)
Select one or more options from the list
___

Create a free account to access the full topic