"If someone asks you to do something you don't know how to, don't tell I don't know, tell I can learn instead." - Myself
Originally posted by cs singh:
Answer is: Compile time error.
I'm not getting the reason for itcall 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
Originally posted by cs singh:
Answer is: Compile time error.
I'm not getting the reason for it![]()
Originally posted by cs singh:
Answer is: Compile time error.
I'm not getting the reason for it![]()
Kiran Kumar.
The man who makes no mistakes does not usually make anything<br /> <br />>>> SCJP 5.0 >> SCJD B&S <<< In progress
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.
"If someone asks you to do something you don't know how to, don't tell I don't know, tell I can learn instead." - Myself
"If someone asks you to do something you don't know how to, don't tell I don't know, tell I can learn instead." - Myself
Consider Paul's rocket mass heater. |