This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages 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