| Author |
anonymous inner class
|
pooja jain
greenhorn
Ranch Hand
Joined: Jan 12, 2005
Posts: 213
|
|
|
It is mention in Kathy & Bert book on 467 page . you can even have class within an argument of method that are anonymous inner class . but my doubt is they are not in method argument .
|
:d
|
 |
Edwin Dalorzo
Ranch Hand
Joined: Dec 31, 2004
Posts: 961
|
|
What do you mean? Somewhat like this satisfies your statement:
|
 |
ankur rathi
Ranch Hand
Joined: Oct 11, 2004
Posts: 3829
|
|
new Base() { int i = 8 ; } ; Pooja , You can consider this line like , this line is giving an reference of an anonymous class & that anonymous calss is a sub class of this Base class & implementation of that anonymous class is b/w the curly braces ... So now you can have this statement any place where ever reference is required , in method argument, at the time of assigning to another reference ... I hope it is right & clear to you ... [ January 14, 2005: Message edited by: rathi ji ]
|
 |
 |
|
|
subject: anonymous inner class
|
|
|