Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Inside Anonymous inner class, we can access Outer class object ?

 
Edward Chen
Ranch Hand
Posts: 798
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Inside Anonymous inner class, we can access Outer class object ?

Thanks

 
Dun Dagda
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you try using outer.this to reference the outer class instance?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic