Life Cycle of Thread

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the legal operands of the instanceof operator?

568


What is use of super keyword?

569


What is incompatible types in java?

543


When arithmeticexception is thrown?

585


In the below example, how many string objects are created?

561






What is bytecode verifier?

508


How do you declare a variable?

631


please send me hr interview questions in it industry

1672


What are the advantages of unicode?

549


How do you sort objects in java?

522


How does list work in java?

512


Can we extend immutable class?

535


What is a variable simple definition?

581


What is package private scope in java?

538


What is a dynamic array in java?

567