What happens if we call run directly instead start() method?

When you call the run() method directly instead of the start() method in a threading context, the code within run() executes on the current thread rather than creating a new, separate thread. This means that no new thread is initiated, and the tasks run sequentially on the existing thread.

Understanding run() vs. start()

Calling start()

The start() method is responsible for creating a new thread of execution. When you invoke start(), the Java Virtual Machine (JVM) allocates a new thread and then calls the run() method within that new thread. This allows multiple threads to execute concurrently, enabling parallel processing and improved application performance.

Example:

class MyThread extends Thread { public void run() { System.out.println("Thread is running."); } } public class Main { public static void main(String[] args) { MyThread t = new MyThread(); t.start(); // Creates a new thread and executes run() } }

Output:

Thread is running.

Calling run() Directly

On the other hand, if you call the run() method directly, it does not create a new thread. Instead, the run() method executes in the context of the current thread, behaving like a regular method call. This means that the tasks within run() run sequentially on the existing thread, without any concurrency benefits.

Example:

class MyThread extends Thread { public void run() { System.out.println("Thread is running."); } } public class Main { public static void main(String[] args) { MyThread t = new MyThread(); t.run(); // Executes run() on the main thread } }

Output:

Thread is running.

Implications of Calling run() Directly

  1. No New Thread Creation:

    • The primary difference is that start() creates a new thread, while run() does not. This means that without using start(), your application does not benefit from multithreading.
  2. Sequential Execution:

    • Tasks execute sequentially on the main thread, potentially leading to performance bottlenecks, especially in applications that require concurrent processing.
  3. Lack of Concurrency:

    • Without initiating a new thread, the ability to perform parallel operations is lost, reducing the efficiency and responsiveness of the application.

Real-Life Example

Imagine you have a kitchen with one chef. If you ask the chef to prepare a dish (calling run()), the chef will do it step by step. However, if you hire an additional chef (calling start()), both chefs can work on different dishes simultaneously, speeding up the overall cooking process.

Conclusion

Calling the run() method directly does not initiate a new thread; instead, it executes the run() method within the current thread, resulting in sequential task execution. To leverage the benefits of multithreading, such as improved performance and concurrency, it's essential to use the start() method, which properly creates and manages new threads.

For a deeper understanding of multithreading and how to implement it effectively, consider enrolling in the Grokking Multithreading and Concurrency for Coding Interviews course by DesignGurus.io. Additionally, the Grokking Advanced Coding Patterns for Interviews can further enhance your ability to manage complex multithreading scenarios effectively.

TAGS
Coding Interview
CONTRIBUTOR
Arslan Ahmad
Arslan Ahmad
ex-FAANG engineering manager and author or Grokking series.
-

GET YOUR FREE

Coding Questions Catalog

Design Gurus Newsletter - Latest from our Blog
Boost your coding skills with our essential coding questions catalog.
Take a step towards a better tech career now!
Explore Answers
How to remove elements from a list in C#?
What is the salary of backend engineer in Stripe?
Which programming language is best for cloud computing?
What to wear to an Apple interview?
Why do I fail at interviews?
What is TestNG in testing?
Related Courses
New
Grokking the AI System Design Interview course cover
Grokking the AI System Design Interview
Learn to design AI systems the way interviewers expect: classic ML products, LLM and RAG architectures, and agentic systems, all through the lens of the system design interview.
4.8
(1,192 learners)
Discounted price for Your Region

$123

Grokking the Coding Interview: Patterns for Coding Questions course cover
Grokking the Coding Interview: Patterns for Coding Questions
The 24 essential patterns behind every coding interview question. Available in Java, Python, JavaScript, C++, C#, and Go. The most comprehensive coding interview course with 543 lessons. A smarter alternative to grinding LeetCode.
4.6
Discounted price for Your Region

$197

Grokking Modern AI Fundamentals course cover
Grokking Modern AI Fundamentals
Master the fundamentals of AI today to lead the tech revolution of tomorrow.
4.1
Discounted price for Your Region

$72

Design Gurus logo
One-Stop Portal For Tech Interviews.
Copyright © 2026 Design Gurus, LLC. All rights reserved.