Suspending, Resuming, and Stopping Threads Using Java 1.1 and Earlier Java Help

Suspending, Resuming, and Stopping Threads Using Java 1.1 and Earlier

Prior to Java 2, a program used suspend( ) and resume( ), which are methods defined by – Thread, to pause and restart the execution of a thread. TIlKY have the form shown below:

final void suspend( )
final void resume(  )

The following program demonstrates these methods:

The Thread class also defines a method called stop( ) that stop  thread. Its signature is shown here:

void stop()

Once a thread has been stopped, it cannot be restarted using resumer I.

[vfb id=1]

Posted on September 17, 2014 in The Complete Reference

Share the Story

About the Author

Back to Top
Share This