hi
i guess that the threads will access the run method once they invoked the start method.in the following program the output is alwaays same.i doubted how the two threads access the run method in a synchronous manner.Thread will usuallly execute in a async manner.why it is different here .
and also
i confused with the output
public class Morecombe{
public static void main(
String argv[]){
Morecombe m = new Morecombe();
m.go(new Turing(){});//THIS SHOULD THROW AN ERROR HJELP ME!!!
}
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);
}
}
}
[ April 09, 2005: Message edited by: Parameswaran Thangavel ]