wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Regarding determining access to class members Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Regarding determining access to class members" Watch "Regarding determining access to class members" New topic

Regarding determining access to class members

Pranali Brahmankar

Joined: Jan 17, 2010
Posts: 3
I just started preparing for SCJP. I'm reading the book - SCJP study guide by Kathy Sierra and Bert Bates.
The table 1.2 named - Determining Access to Class Members, isn't it incomplete? I think there must be 2 more columns to it as given in the chart as follows-

will explain why i prepared that chart so.

Please correct me if I'm wrong.
Ankit Garg

Joined: Aug 03, 2008
Posts: 9280

Hi Pranali, welcome to javaranch.

I think the two columns that you added are redundant. The 3rd and 4th rows say "From a subclass in the same package" and "From a subclass outside the package". So if you match those two rows with the protected column, you'll yes in both cases. This is what your extra two columns also signify. And those two columns don't make much sense in case of rows 1,2 and 5 as the columns mention subclass in same and different package but the rows are talking about non-subclasses...

SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
rushikesh sawant
Ranch Hand

Joined: Dec 22, 2009
Posts: 65
hi pranali, that table is complete one. Those two additional columns can be derived from this table.

SCJP 5.0 100%
Pranali Brahmankar

Joined: Jan 17, 2010
Posts: 3
OK. I agree that these 2 columns are derived from the basic chart. But i think even they are necessary and are not redundant if we don't think only of sub-classing.
jQuery in Action, 2nd edition
subject: Regarding determining access to class members
Similar Threads
Scjp help
Default Access
Traps to be aware of in any SCJP test !!!!! :)
Compiling errata for K&B, SCJP 6