If you want to restrict an element such that it is only visible to subclasses, regardless of what package they are in, then declare them private protected.
Rahulkk Kumar wrote:If They meant 'private or protected' then the whole statement must be wrong because private member is not visible to subclass.
private member can be only use within same class where it is declared.
Good grief! That isn't a misprint at all. For one thing the format of that variable is not normal for Java®; it looks like an escape from C. In fact many older Java® applications look like C applications with a slightly different syntax.Rahulkk Kumar wrote:. . . private protected int n_pripro = 4; . . .
Campbell Ritchie wrote:The private protected access was only permitted in some early versions of JDK1.0. It has been removed...
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Early on, the Java language allowed for certain combinations of modifiers, one of which was private protected. The meaning of private protected was to limit visibility strictly to subclasses (and remove package access). This was later deemed somewhat inconsistent and overly complex and is no longer supported.[5]
[5] The meaning of the protected modifier changed in the Beta2 release of Java, and the private protected combination appeared at the same time. They patched some potential security holes, but confused many people.