Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Argument-Defined Anonymous Inner Class

 
Nitin Kulkarni
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have a question on the following code

This program outputs "doStuff"
Is there any way that I could get "fluffy" to print out?
I do not know how to access this method that is inside the
Argument-Defined Anonymous Inner Class.

Thanks
[ August 25, 2004: Message edited by: Nitin Kulkarni ]
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since the method doStuff contains the reference to the Foo type object, you can invoke methods of Foo from the doStuff method context.

Is there any way that I could get "fluffy" to print out?

Yes. Change what doStuff does with its Foo reference.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic