Originally posted by A Kumar:
The significance of the statement can be gauged if u can modify your code a
wee bit....remove extends of the third class...now this class is not extending any class...and see ...there is a compiler error.
i have pasted the code for you..
Once the subclass-outside the package inherits the protected member the member becomes private to anycode outside the subclass .So if a class “neighbour” instantiates a child object,then even if class neighbour is in same package as class child,class neighbour would not b able to access to the child protected (inherited)member with the exception of subclasses of the subclass