Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Protected Access

 
henley
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic