This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes Protected Access Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Protected Access" Watch "Protected Access" New topic
Author

Protected Access

henley
Greenhorn

Joined: Jul 06, 2000
Posts: 16
I thought I remembered reading that protected fields/methods were accessible to only one level of subclasses. When I recently tested that, I found that it was not true. Does anyone else remember reading that in some book and if so which book?
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi!
protected varibles/methods can be accessible from the same class,sub classes in the same package, other classes in the same package and sub classes in other packages.
i dont know from which book i found it but i read it in some book.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Protected Access
 
Similar Threads
Can you synchronize an array?
Declaration and Access Control
Passed SCJP with 93%
combination of access & non-access modifiers for a class
Do you read books on computer