• Post Reply Bookmark Topic Watch Topic
  • New Topic

Inner classes within inner classes  RSS feed

 
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: 55772
163
  • 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
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!