aspose file tools*
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 Java 8 in Action this week in the Java 8 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
Declaration and Access Control
Passed SCJP with 93%
combination of access & non-access modifiers for a class
Do you read books on computer
Can you synchronize an array?