Java Thread suspend() methodLast Updated : 17 Mar 2025 The suspend() method of thread class puts the thread from running to waiting state. This method is used if you want to stop the thread execution and start it again when a certain event occurs. This method allows a thread to temporarily cease execution. The suspended thread can be resumed using the resume() method. SyntaxReturnThis method does not return any value. ExceptionSecurityException: If the current thread cannot modify the thread. ExampleOutput: Thread-0 1 Thread-2 1 Thread-0 2 Thread-2 2 Thread-0 3 Thread-2 3 Thread-0 4 Thread-2 4 Next TopicJava Thread |
We request you to subscribe our newsletter for upcoming updates.

We deliver comprehensive tutorials, interview question-answers, MCQs, study materials on leading programming languages and web technologies like Data Science, MEAN/MERN full stack development, Python, Java, C++, C, HTML, React, Angular, PHP and much more to support your learning and career growth.
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India