Sun certification level tutorial and examples Organized by topic.
Friday, February 27, 2009
Anonymous inner class implements some interface
package innerclass;
interface Inter { public void m2(); } class Test { public static void main(String arg[]) { Inter i=new Inter(){ public void m2() { System.out.println("Hai"); } }; i.m2(); // hai } }
What is the use this anonymous inner class?...
ReplyDelete