Java Concurrency Interview

Threads and lifecycle question 7 of 180 junior

Why must you call start() rather than run()?

run() is an ordinary method call. It executes on the calling thread, the new thread is never created, and everything is sequential. start() registers the thread with the OS scheduler, which then calls run() on the new stack.

A second detail interviewers like: a Thread object is single use. Calling start() twice throws IllegalThreadStateException, because the state machine only ever moves forward towards TERMINATED.

basics

Quiz yourself on Threads and lifecycle Suggest a correction