File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Protected Access Modifier Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Protected Access Modifier" Watch "Protected Access Modifier" New topic

Protected Access Modifier

Thomas Markl
Ranch Hand

Joined: Mar 08, 2001
Posts: 192
"In java a protected variable is more accessible than a default variable (variable with no access modifier).
I think this is true because a protected variable is visible in the package and in subclasses of the class outside the package while default only means package access.
What do you think?
Marilyn de Queiroz

Joined: Jul 22, 2000
Posts: 9059
I agree.

"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Protected Access Modifier
It's not a secret anymore!