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.
Well behaved women rarely make history - Eleanor Roosevelt. tiny ad: