aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes when does a new call stack is created in Threads? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "when does a new call stack is created in Threads?" Watch "when does a new call stack is created in Threads?" New topic
Author

when does a new call stack is created in Threads?

Namit Puri
Ranch Hand

Joined: Aug 19, 2006
Posts: 51
Hi,

When does a new thread of execution starts(with a new call stack)?
a) when the start() method is invoked //refer pg 681 k&b
b) when the run() method is invoked // refer pg 676 k&b

Thanks!


Regards,
Namit Puri
SCJP 6.0
"Success is a journey, not a destination." Ben Sweetland
Satish Kota
Ranch Hand

Joined: Feb 08, 2006
Posts: 88
when a thread's start method is is called the thread is moved from Alive to runnable state, with a new stack allocated to it.


SCJP 5.0 77%
Sanjeev Singh
Ranch Hand

Joined: Nov 01, 2006
Posts: 381
a) when the start() method is invoked


~Sanjeev Singh<br />SCJP 1.5
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: when does a new call stack is created in Threads?