Sie sind auf Seite 1von 2

2/8/2014

Thread States in Java | JavaTechInfo.Com

JavaTechInfo.Com
--- Java Tutorials, Interview Questions and Jobs

Home To receive our daily posted JOBS & INTERVIEW Q and A's on your email inbox for FREE, just enter your email address below and click 'Submit' button. Submit Make sure to activate your subscription by clicking on the activation link sent to your email.
Interviews By Company
Like

Core Java

J2EE

Hibernate

Spring

Web Services

Java Interviews

Find us on Facebook

Search:

Javatechinfo
Like

Interview Question & Answers


666 people like Javatechinfo.

Tricky Core Java Interview Question and Answers Top 50 Tricky Hibernate Interview Question and Answers Servlet Interview Questions and Answers for Experienced Professionals

Facebook social plugin

Tricky SQL Queries

Share Kiran Baghel and 665 others like this.

Core Java

Java To

Java Using

For Java

Accenture Birla Soft CapGemini CGI IBM Infosys J P Morgan Mphasis Oracle Polaris Sapient Semantic Space Siemens Virtusa Wipro Click For More.....

Thread States in Java


Core Java, Threads A thread can be in one of Four states for threads: new, runnable, blocked, dead.

Popular Posts

Top 50 Tricky Hibernate Interview Questions Tricky Core Java Interview Question and Answers Web Services Interview Questions and Answers Servlet Interview Questions and Answers for Experienced Professionals Accenture Java Interview Questions CapGemini Java Interview Questions and Answers
Recent Posts

Step 1: When a thread has just been created using the new operator, it is in the new state. Step 2: Once start method is invoked (which calls the run method), the thread becomes runnable. A runnable thread might not be running. There can be many runnable threads. But only one of them can be running at any time point. OS decides which thread to run. More on this later. Step 3: A runnable thread enters the blocked state when The thread is currently running and method Thread.sleep is called suspend method of the thread is called. (deprecated) The thread calls the await method. The thread tries to lock an object locked by another thread. The thread calls an operation that is blocked on i/o. Step 4: A blocked reenters runnable state when It has slept the specified amount of time. resume method of the thread is called. (deprecated) Another method calls signal or signalAll Object lock released by other thread I/O completed. Step 5: A runnable thread enters the dead state when Its run method exits. Natural death. stop method of the thread is called. (deprecated) An exception is thrown but not caught.

Walk-In Drive for Software Developers @ QuadLabs Technologie... Walk-In Drive for Java professionals @ Cognizant Technology ... Walk-In Drive for Java/j2ee Professionals @ Arrow Electronic... Openings for Senior Java Developers @ Idexcel IT services Openings for JAVA Professionals @ ASAP Info Systems Pvt Ltd Openings for Software Engineers @ Seclore Technology Pvt Ltd... Openings for Java/spring Developers @ Randstad India Limited Openings for Java Developers @ Avansys Software Solutions

To receive our daily posted JOBS & INTERVIEW Q and A's on your email inbox for FREE, just enter your email address below and click 'Submit' button.

http://www.javatechinfo.com/2013/01/thread-states-in-java.html

1/2

2/8/2014

Thread States in Java | JavaTechInfo.Com


Enter your email address: Submit Make sure to activate your subscription by clicking on the activation link sent to your email.

Java Tutorials Java Framework For Java


Java Jobs

Related Posts
Different ways to create an object in java Java Virtual Machine Versions of Java What is StackOverflowError in Java with Example Java 7 feature: Advanced type inference in generics
Find us on Facebook

jobs in Bangalore jobs in chennai jobs in cochin jobs in Delhi jobs in Gurgaon jobs in Hyderabad Jobs in Mumbai Jobs in Noida Jobs in Pune Onsite Jobs Other Locations Today Jobs
Walk-Ins

Javatechinfo
Like

666 people like Javatechinfo.

Bangalore
Facebook social plugin

Chennai Hyderabad Kolkata Pune walkins

Core Java

Thread Methods ThreadLocal Thread States Serialization Synchronization


Tutorials

Core Java Hibernate JDBC Spring


Google+ Followers

Ram D
Add to circles

22 have me in circles

View all

Home Core Java Companies J2EE

Hibernate Tutorial Java Interview Questions by Java Web Services Tutorial

Valid XHTML 1.0 and CSS 3!

Powered by Blogger 2012 JavaTechInfo.C om By Sivan. C onverted by LiteThemes.com.

http://www.javatechinfo.com/2013/01/thread-states-in-java.html

2/2

Das könnte Ihnen auch gefallen