GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing www.geeksforgeeks.org — What does start() function do in multithreading in Java - GeeksforGeeks What does start() function do in multithreading in JavaLast Updated : 23 Apr, 2026 In Java, threads enable concurrent execution of multiple tasks within a program. They help improve performance and responsiveness in applications.
start() MethodThe 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:
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:
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 Explore |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |