Home » Java ThreadGroup resume() method with Examples

Java ThreadGroup resume() method with Examples

by Online Tutorials Library

Java ThreadGroup resume() method

The resume() method of ThreadGroup class is used to resume all threads in the thread group which was suspended using suspend() method.

Syntax

Return

public final void resume()

Exception

SecurityException: This exception throws if the current thread is not allowed to access the thread group or any of the threads in the thread group.

Example

Test it Now

Output:

Starting of Thread-1  Starting of Thread-2  Thread-2 completed executing  Thread-1 completed executing  

You may also like