aspose file tools*
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "private protected..." Watch "private protected..." New topic
Author

private protected...

Derek Mason
Greenhorn

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?
thanks,
Derek.
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
public
private
protected
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.
Regards
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


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

Joined: Sep 23, 2000
Posts: 3205
    
    2
'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.
HTH,
Paul.

------------------
Get Certified, Guaranteed!
(Now Revised for the new Pattern)
www.enthuware.com/jqplus


Enthuware - Best Mock Exams and Questions for Oracle/Sun Java Certifications
Quality Guaranteed - Pass or Full Refund!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: private protected...
 
Similar Threads
method modifiers
Protected and Private
protected variables
How come public and friendly(default) access is allowed for top level class but not
Private and Protected Constructors