I assume that you're referring to the discussion on page 36 of K&B (
SCJP 5). What they're talking about is this situation:
In the above code fragment, package2.Child inherits the protected instance variable x from package1.Parent. This inherited x variable is
NOT visible to other classes in package2 (hence the error in Neighbor's foo() method), so in that sense it's no longer "protected". Contrast this to if you declare a new "protected int x" in Child, which
would be visible to Neighbor. So in this sense x is now "private" with respect to all other classes outside package1.
Admittedly, the paragraph in K&B that explains this is confusing, largely because of their use of the term "private". When they say "private" there, they're not using it in exactly the same sense as the usual
Java "private" modifier. (This is why the paragraph also uses the phrase "
essentially private" to describe the concept.)
[ October 30, 2007: Message edited by: Kelvin Lim ]