Explain thread life cycle in java?
Answer / Vikas Saini
The life cycle of a Java thread consists of six states: New, Runnable, Running, Blocked, Terminated, and Dead. A newly created thread starts in the 'New' state, then transitions to the 'Runnable' state when it is added to the pool of threads that are ready to be executed by the JVM. Once started, a thread enters the 'Running' state until it finishes or blocks. Upon completion, it moves to the 'Terminated' state and eventually becomes 'Dead'. A dead thread cannot be restarted.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is "Java Native Interface" and how to use it?
Can we override private method in java?
Can Exception handling we can handle multiple catch blocks?
How do you do math powers in java?
Can a Byte object be cast to a double value?
what is session facade ?
What is regex used for?
What is a function easy definition?
Does java have a compiler?
what is the use of private constructor in core java?
3 Answers OnMobile, Satyam, Yash Technologies,
How many tetrahedral voids are there in bcc?
Which method will get invoked first in a stand alone application?