Sonir :
When you call the start method a new
thread object is handed over to the thread scheduler.
After this,the rest of the main method
maycontinue execution. If this happens the value printed will be the original value of x, i.e. 5.
OR the thread schduler may start running the newly created thread in which case the value of x will be 10.
Based on the operating system's scheduling algorithms and on the other threads that are running/ready at the time you run this code, the output may differ.
HTH
[ January 17, 2002: Message edited by: Shivaji Marathe ]