Life Cycle of Thread

Answers were Sorted based on User's Feedback



Life Cycle of Thread..

Answer / 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

Life Cycle of Thread..

Answer / gajendra

A Thread has the following life cycles states
1.New/Born state:When a thread is just instantiated we say
that the thread is in born state.now it can not compete for
CPU cycles.
2.Active state:When we call the start() on thread object a
thread moves from born state to active state.Here the code
associated with run() will be executed.
3.Blocked state:When the thread is temporarily keep out of
ready queue,we say that the thread is in blocked state. In
this state it can't compete for CPU cycles.
4.Dead state:When the thread execution is completed or
forcibly terminate the thread, it will be moved to dead
state.

Is This Answer Correct ?    7 Yes 2 No

Life Cycle of Thread..

Answer / banti

Thread has following life cycles:
1.Ready to Run
2.Runnable
3.Running
4.Blocked/Waiting
5.Dead

Once thread is dead there is no way it coming back to
running state.

Is This Answer Correct ?    3 Yes 1 No

Life Cycle of Thread..

Answer / deepak divvela

1.ActiveState
2.RunnableState
3.RunningState
4.Blocked State
5.Dead State

These are the Thread Life Cycle States

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More Core Java Interview Questions

Where is the singleton class used?

0 Answers   Cap Gemini,


Hi all, I am dng a mini project on FileSplitter application which splits the GBs of logfile into Smaller chunks(mbs) depending on the split size." How to handle GBs file? I am getting OutOfMemoryException, when I input such GB sized file. Thx

0 Answers  


Functionality of JVM?

7 Answers   Infosys,


What is the most important feature of java? What is an interface?

0 Answers  


What modifiers may be used with an inner class that is a member of an outer class in java programming?

0 Answers  






How to sort a vector elements that contains the user define class object? (Note: If Suppose consider, A Student class contain two data members. They are String studentName and int rollNo. I am creating Four objects for this class, each object contains students details like name and roll no. Now i am storing that objects in vector and if i retiving the elements from the vector means then it should be display in sorting order)

3 Answers   ProdEx Technologies,


what is main difference between architecture,framework and design pattren

3 Answers  


Write a program to find the greatest of three numbers in java?

0 Answers  


What is user defined exception?

4 Answers  


How do I convert a string to an int in java?

0 Answers  


What is threaded programming and when is it used? : Java thread

0 Answers  


Which java ide is used the most?

0 Answers  


Categories