Aman King

Access modifiersControl PanelChange LogBrowse PagesSearch?

Access modifiers

I'm pretty much clear about the access modifiers in C++, Java and Ruby but there is one thing that always confused me... I want to jot it down so that I don't forget again...

In C++, protected is like private except that subclasses can access protected members.

However, in Java, protected is like default except that subclasses (even those outside the original class's package) can access protected members.

Tags: technology:java Last modified 07:24 Thu, 1 Mar 2007 by AmanKing. Accessed 679 times Children What Links Here share Share Except where expressly noted, this work is licensed under a Creative Commons License.