I have four thread instances and they are executing run()
code given below:
public void run (){
System.out.println("1st line :"+Thread.CurrentThread().getName());
System.out.println("2nd line :"+Thread.CurrentThread().getName());
System.out.println("3rd line :"+Thread.CurrentThread().getName());
System.out.println("4th line :"+Thread.CurrentThread().getName());
System.out.println("5th line :"+Thread.CurrentThread().getName());
System.out.println("6th line :"+Thread.CurrentThread().getName());
}
When one thread out of four is executing first line then at the same time what will remaining three threads do?
Either they are waiting for executing first line or will they proceed other lines of code?