Originally posted by Stuart Gray:
A protected variable is available to all subclasses (and subclasses of those classes) regardless of the package they are in. They don't 'become private' or anything like that.
Originally posted by Rick O'Shay:
The emphasis is important. If B extends A it has access to String foo. If C extends B, String foo is private for all intents and purposes. C will not have access to String foo even.
SCJP 1.4, SCWCD 1.3, SCBCD 1.3