I know, you can not create a constructor since it doesn't have a name. But here, how is it possible to passible to pass anonymous class as a parameter?
public class Morecombe{
public static void main(
String argv[]){
Morecombe m = new Morecombe();
m.go(new Turing(){});
}
public void go(Turing t){
t.start();
}
}
class Turing extends Thread{
public void run(){
for(int i =0; i < 2; i++){
System.out.println(i);
}
}
}
Thanks,<br />Thiru<br />[SCJP,SCWCD,SCBCD]