Originally posted by Ilja Preuss:
I do know what anonymous inner classes are, but what does argument-defined mean?
Hi Ilja,
Thanks for replying
At the most basic level, A-D.A.I.C. are just what the name suggests.
They are anonymous implementation of interfaces, defined in the calling methods argument list.
This, seemingly, allows the method to instantiate and use an interface 'object' for otherwise mundane java tasks
In my understanding, this can additionally be spiced up a bit by having subclasses defined in the method argument list as well. Ofcourse, other rules governing anonymous classes apply to this technique like no more than one interface can be implemented etc.
Now, my real doubt is why/what is the exact use of this knowledge(!!) As I see it, this is just like trying to catch the ear from the wrong side.
Any inputs on this wud be highly appreciated.
Cheers,
PK
[ August 04, 2006: Message edited by: Prakalp Shrivastava ]