Originally posted by cs singh:
Answer is: Compile time error.
I'm not getting the reason for it call it as not through a but through b
because it is protected n it inherit as privetly so it can't call by the class where it reside
b know that it's it's own property
In class A, the member "i" is marked as protected, so it's accessible only by classes defined in the same package.
If you want to make the "i" member accessible through class B, you must either mark "i" as public or default.