Long description

Step 1: single entry point. Step 2: new state. Step 3: program starts the thread and places it in the runnable state. Step 4: runnable state can further enter into four states: waiting, where the thread waits; timed wait, where the thread waits or sleeps; terminated, where the task is complete; and blocked, when the runnable thread issues i o request and enters synchronized statement. The thread transitions back to the runnable state from the following states: waiting, when another thread notifies it; timed waiting, when the interval expires; blocked, when i o completes and acquires lock interrupt. Step 5: single exit point from the terminated state.

Get Java How to Program, Early Objects, 11th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.