This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

private protected...

 
Derek Mason
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 275
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Theres no such thing.
 
Danish Shaukat
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Paul Anilprem
Enthuware Software Support
Ranch Hand
Posts: 3776
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
'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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic