Rahul Shivsharan wrote:
can anybody tell me wether we have instantiated interface or what ? i'm not able to understand the above code and how it works
Ulrika Tingle is right. Ex01_24_09 is an anonymous-inner class that implements the Ex01_24_09 interface implicitly. It is anonymous because it doesn't have any name that you can use to refer to it later. And inner because it is defined as part of a statement in a method.
Also ex01 is an object of the anonymous class Ex01_24_09.
This should be able to explain anonymous and inner classes in detail.
It's hard to be objective and witty at the same time, unless you sacrifice rationality.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: How come the instantiation of interface workes in my code