• 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: 3817
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic