Tuesday, August 5, 2008

JAVA Threade

In java Thread means two different things
---instance of class java.lang.Thread
it is just an object. Like other object it has variable and methods, and lives and dies on the heap.
---A thread of execution
It is individual process (a "lightwaight" process) that has it's own call stack. In java there is one thread per call stack----in revers, one call stack per thread.

----main(), runs in one thread call main thread