Dear all,
I had three packages
So here protected variable get accesed in class 2 and class 3 only...if protected variable accesed in class2 why not it has been accesed in class21 as in book(
SCJP preparation) they are telling once the protected variable is accesed through sub-class it will become private for that class so i agree with this so other classes can't access (class21 cant acess class2 inherited protected variable) so when we extend class2 in another package(test3-class3)it will be acceses how this is possible