A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
default class member visibility in java 6
Joined: Jan 03, 2006
Jun 29, 2008 08:15:00
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.
author and iconoclast
Joined: Jul 08, 2003
Jun 29, 2008 09:03:00
Yes, that's right. That's been true in every version of
since the beginning.
[ June 29, 2008: Message edited by: Ernest Friedman-Hill ]
[Jess in Action]
subject: default class member visibility in java 6
Question - Philip Heller's book
probably statement of the obvious regarding class member access
Question about protected access
protected and package/default access
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014