Module: | Arrays, Strings & Exception Handling
Q52: Consider the following statements regarding the start() and run() methods:
1. Invoking the start() method commands the Java Virtual Machine to allocate a brand new, independent memory call stack for the thread before executing the run() method internally.
2. If a developer explicitly calls the run() method directly on a Thread object, the Java compiler will throw a severe IllegalThreadStateException to prevent synchronous blocking.
3. Once a thread has successfully completed its execution and transitioned to the TERMINATED state, invoking the start() method on that exact same object a second time will trigger a runtime exception.
Which of the above statements is/are correct?
2. If a developer explicitly calls the run() method directly on a Thread object, the Java compiler will throw a severe IllegalThreadStateException to prevent synchronous blocking.
3. Once a thread has successfully completed its execution and transitioned to the TERMINATED state, invoking the start() method on that exact same object a second time will trigger a runtime exception.
Which of the above statements is/are correct?
✅ Correct Answer: B
🎯 Quick Answer:
The correct combination is 1 and 3. Statement 2 is incorrect because calling the run() method directly is perfectly legal in Java; however, it completely bypasses the multithreading architecture. It simply executes the method synchronously on the current parent thread just like any normal method call, without throwing an exception.The run() method simply contains the user-defined business logic that the newly spawned thread will eventually execute.
Structural Breakdown: Invoking start() causes the JVM to shift the thread state from NEW to RUNNABLE, allocate a dedicated Stack memory zone, and register the thread with the OS scheduler.
Historical/Related Context: A classic "gotcha" in technical interviews involves asking what happens if run() is called instead of start(). In a high-performance web server, if a developer accidentally calls run(), the main thread handling incoming user requests will freeze and execute the background task itself, completely destroying the server's concurrency and causing severe latency.
Causal Reasoning: The JVM throws an IllegalThreadStateException if start() is called twice (Statement 3) because thread execution is fundamentally a one-way, irreversible lifecycle.
Once the OS reclaims the thread's Stack memory upon termination, the original Thread object becomes an empty shell that cannot be resurrected.