• Post Reply Bookmark Topic Watch Topic
  • New Topic

Inner classes within inner classes

 
Leo Velazquez
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If C is a regular(non method local) inner class of B and B is an inner class of A, does C have direct access to A's private fields just as B does?
 
Campbell Ritchie
Marshal
Posts: 52565
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried it?
 
Chandra Bhatt
Ranch Hand
Posts: 1710
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Leo,

You can match your case with the following code:





Regards,
cmbhatt
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!