Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Can you explain the Java thread lifecycle?

Answer Posted / nashiinformaticssolutions

In Java, a thread can exist in any of the following states. The states are as follows:

New: When a new thread is first created, it is always in the new state. For a thread in the new state, the function hasn't begun to execute because it hasn't been performed yet.

Active: When a thread invokes the start() method, it moves from the new state to the active state. The active state contains both the running state and the runnable state.

Blocked or Waiting: When a thread is not active for a period of time (but not forever), it is either in the blocked state or the waiting state.

Timed waiting is what happens when we apply the sleep() technique to a certain thread.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Will set allow duplicates in java?

938


What is the significance of continue jump statement? Explain with an example.

1267


What is the difference between multiple processes and multiple threads?

1140


What are the benefits of immutable objects?

964


Is hashset ordered java?

1046


What is the equal sign?

1048


What is difference in between java class and bean?

1045


Explain about OOPS concepts and fundamentals.

1011


What are the string methods in java?

1042


What is the difference between the paint() and repaint() methods?

1027


If an application has multiple classes in it, is it okay to have a main method in more than one class?

978


String class is defined under which package in java?

1034


Explain the importance of throws keyword in java?

954


How do you remove an object from an arraylist in java?

919


How to access arraylist elements in java?

955