As far as i know , protected memebers can only be accessed from inside the class or by a class which is inheriting it , but here i am able to call a protected member from outside a class & the irony is the second class is not inheriting it .
Default (aka package) scope makes members visible to classes in the same package. Protected makes them visible within the package plus classes that extend the containing class. You'll find many sources that only mention the extending classes and forget to remind us about the classes in the same package. Bruce Eckell keeps it all straight in Thinking In Java.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi