This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Because it would break encapsulation: A shouldn't need to know that B extends C, as this is an implementation detail of B. It would make your design much more fragile if A would know. Why do you want to? We probably could find a more appropriate solution...
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Joined: Dec 24, 2002
Thats true...I understand its more of a design decision than an implementation Issue. So basically in order to support encapsulation java doesn't allow to access C from A(i tried doing that and got an error thrown). Correct me if i'm wrong It is more out of curiosity that i wanted to know why is it like that. Thanks