This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes default class member visibility in java 6 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "default class member visibility in java 6" Watch "default class member visibility in java 6" New topic
Author

default class member visibility in java 6

Gasan Guseynov
Ranch Hand

Joined: Jan 03, 2006
Posts: 67
Am I right that default visibility is package. So it's more strict then protected (that allows to access class member in the same package in from descendent) and allows access only from the same package. Many thanks.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Yes, that's right. That's been true in every version of Java since the beginning.
[ June 29, 2008: Message edited by: Ernest Friedman-Hill ]

[Jess in Action][AskingGoodQuestions]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: default class member visibility in java 6