|
|
Re: Understanding Thread
|
Posted: Mar 6, 2006 10:56 PM
|
|
I don't know a good site, but I can give you the basics.
If you don't use multi-Threading, Java like any other programming language only executes one command at a time, the complete program will be executed one command after the other.
If you create a thread, you could say that a new program is started. This Thread is not part of the execution cue of the main program. Wehn you call threadInstance.start(), a new program handler will be created and the new program will be started (by executing the run method).
The point is that the main program does not wait for the run method to finish, but continues it's execution instantly.
|
|