Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

visible modifiers

 
samatha vanga
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what r visible modifiers
 
Paul Anilprem
Enthuware Software Support
Ranch Hand
Posts: 3711
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You mean visibility modifiers: public, protected, and private. If you don't put any of these modifiers then the visibility is default, which is more than private but lower than protected. Check this out.
 
Rajinder Yadav
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul,
I would like to correct you in saying that the default access modifier is less restrictive, not more restrictive than the private access modifier (maybe it's the way you have it worded as visibile which i find is the incorrect term to be using)
Restriction level of access modifiers (most restrictive to least):
private--->(default)-->protected--->public
[ May 13, 2003: Message edited by: Rajinder Yadav ]
 
Paul Anilprem
Enthuware Software Support
Ranch Hand
Posts: 3711
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rajinder, Since samatha used the term visibility, I explained default in that context, which was correct. You are also correct because you are talking wrt restrictiveness, which is opposite to visibility.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic