File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes private protected... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "private protected..." Watch "private protected..." New topic

private protected...

Derek Mason

Joined: Oct 28, 2000
Posts: 13
Every where I read that there are 3 access modifiers, public private and protected ( there is no modifier for friendly) but yesterday I read in one place that there is another one. 'private protected'. Can anybody tell me how it works?
Sahir Shibley
Ranch Hand

Joined: Apr 08, 2000
Posts: 275

Theres no such thing.
Danish Shaukat
Ranch Hand

Joined: Nov 16, 1999
Posts: 340
Hi Derek !
There are 3 access modifiers
The default access modifier(that is when you do not specify any access modifier) is friendly.
Thats all about it. Never heard of anything you mentioned.
Danish Shaukat.
Jane Griscti
Ranch Hand

Joined: Aug 30, 2000
Posts: 3141
Hi Derek,
I believe there are some OOP languages which allow 'private protected' as an access modifier; but it is not allowed in Sun's implementation of Java.
Hope that helps.

Jane Griscti
SCJP, Co-author Mike Meyers' Java 2 Certification Passport
Paul Anilprem
Enthuware Software Support
Ranch Hand

Joined: Sep 23, 2000
Posts: 3635
'private protected' was there in Java 1.0 but was later on removed. Access rights associated with it were quite complicated. I don't remember them now. But you need not worry about it as it is "eradicated" completely.

Get Certified, Guaranteed!
(Now Revised for the new Pattern)

Enthuware - Best Mock Exams and Questions for Oracle Java Certifications
Quality Guaranteed - Pass or Full Refund!
I agree. Here's the link:
subject: private protected...
It's not a secret anymore!