Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

protected member

 
Raju Champaklal
Ranch Hand
Posts: 521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


why will this compile?

isnt x protected in B
how can it be accessed in other class?

 
Phungsuk Wangdu
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hiii
raju protected members are accessible in to all classes in the package ,and is inheritable by any subclasses outside the package
 
Raju Champaklal
Ranch Hand
Posts: 521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh right.......i forgot that.....thanks a ton
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic