VOOZH about

URL: https://www.geeksforgeeks.org/java/start-function-multithreading-java/

⇱ What does start() function do in multithreading in Java - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

What does start() function do in multithreading in Java

Last Updated : 23 Apr, 2026

In Java, threads enable concurrent execution of multiple tasks within a program. They help improve performance and responsiveness in applications.

  • Threads can be created by extending the Thread class or implementing the Runnable interface, both requiring the run() method.
  • Use the start() method to begin execution, as it internally calls run() and creates a new thread.

start() Method

The purpose of start() is to create a separate call stack for the thread. A separate call stack is created by it, and then run() is called by JVM. The main purpose of the start() method is to create a separate call stack for a new thread. When start() is invoked:

  • JVM creates a new thread.
  • A separate call stack is allocated for that thread.
  • The JVM internally calls the run() method.

Because of this, multiple threads can execute simultaneously.

Example: Java code to see that all threads are pushed on same stack if we use run() instead of start().

Output:

Thread 1 is running
Thread 1 is running
Thread 1 is running
Thread 1 is running
Thread 1 is running
Thread 1 is running
Thread 1 is running
Thread 1 is running

Explanation: Calling run() directly executes the method in the main thread, so no new thread is created and the same thread ID is printed every time. Since there is no multithreading, all 8 executions run sequentially in a single call stack.

Comment
Article Tags: