Anonymous inner class declared in method arguments
package innerclass;
class Test1{
public static void main(String arg[])
{
new Thread( new Runnable()
{
public void run()
{
System.out.println("run");
}
}).start();
}
}
output:
run
0 comments:
Post a Comment