Life Cycle of Thread

Answer Posted / guru

When an object is created using Thread class,it is in the
new state, when the start method is called the object goes
into the runnable state from where the scheduler picks up
and starts executing. If that process requires any resource
it is picked and put to the blocked state and when the
process finished that thread is in dead state.
states:
1 new
2 runnable
3 running
4 blocked
5 dead

Is This Answer Correct ?    15 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we execute a program without main?

531


What do you mean by flow of struts?

741


What is java’s garbage collected heap?

529


What is stringwriter?

535


What is use of static method?

528






What is string [] args?

551


What is singleton service?

500


Explain abstract class in java?

552


What is the r character?

582


What is the use of a conditional inclusion statement in Java ?

582


In how many ways we can do exception handling in java?

569


What state is a thread in when it is executing?

525


What is a classloader in java?

534


What is a method type?

527


what do you understand by synchronization? Or what is synchronization and why is it important? Or describe synchronization in respect to multithreading? Or what is synchronization? : Java thread

482