This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread 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 Murach's Java Servlets and JSP this week in the Servlets 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]
 
 
subject: default class member visibility in java 6
 
Similar Threads
Question - Philip Heller's book
protected and package/default access
probably statement of the obvious regarding class member access
Question about protected access
javadoc help