Prepare
Practice
Interview
Aptitude
Reasoning
English
GD
Placement papers
HR
Current affairs
Engineering
MCA
MBA
Online test
Login
Online Practice Test
>
Java
« Previous
Next »
When a thread terminates its processing, into what state that thread enters?
Options
- Running state
- Waiting state
- Dead state
- Beginning state
CORRECT ANSWER : Dead state
Discussion Board
Thread state
Thread has a life cycle that it goes through everytime a method runs. The life cycle of thread is as follows:
1. New Thread
2. Runnable
3. Not Runnable
4. Dead State
The thread when in dead state the reason can only be two:
1. It is dying from natural cause
2. It has been killed or stopped by another method in the process.
A thread enters in this state when its run method exits normally. So, during the termination stage the thread becomes a part of dead state. This happens mostly in loop cases where the infinite loop runs and when the resource is full the method exits. Stop method is used to stop a thread or terminate it prematurely.
Rohit Sharma 07-28-2014 02:20 AM
java interview question
want all java programming question as i am prepare for scjp
sagar 06-27-2014 10:00 AM
« Previous
Next »
Write your comments
*
*
Email must be in the form someone@domain.com
*
*
Enter the code shown above:
Please enter the code shown above
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)
Related Content
Java Beginner (11)
Java (39)
Java (40)
Java (22)
Java (30)
Java (25)
Java (20)
Java (20)
Core Java (20)
Core Java (10)
Core Java (72)
EJB (20)
JDBC (20)
Applet (20)
Struts (21)
Servlets (20)
Java Web Services (20)
Javascript (40)
J2EE (10)
jQuery (46)
Advertisement
▲