Skip to main content
2 of 3
added 83 characters in body
sstan
  • 36.8k
  • 7
  • 54
  • 72

This is because class C can see A's protected methods from within its own inheritance tree. But it's not allowed to access A's protected methods for another class (B) from a different inheritance tree. C is not part of B's inheritance tree, therefore the behavior is normal.

sstan
  • 36.8k
  • 7
  • 54
  • 72