Java ThreadGroup suspend() methodThe suspend() method of ThreadGroup class is used to suspend all threads in the thread group. SyntaxReturnThis method does not return any value. ExceptionSecurityException: 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 1Test it NowOutput: Starting of Thread-1 Starting of Thread-2
Next TopicThreadGroup in Java
|