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
Explain why wait(), notify() and notifyall() methods are in object class rather than in the reading class?
what is recursion in java
Why is java not 100% pure oops?
What is appletviewer?
Can we override private constructor in java?
Which method returns the length of a string?
What is command line used for?
Where are variables stored?
Why arraylist is not synchronized in java example?
What do you understand by synchronization?
How can you add and remove nodes in jtree?
What is file in java?
What is enhanced loop in java?
What is an object’s lock and which object’s have locks?
Which variable is the independent variable?