Class Inheritance Program Output - Java Quiz Question


What will be the output of the following program?


A
Compilation Error at LINE Y - since class B is not extending class A
B
i = 4
C
i = 10
D
Compilation Error at LINE X - since the member variable i is not accessible in b's object