FileDocCategorySizeDatePackage
StopStop.javaAPI DocExample2874Sun Feb 08 21:34:08 GMT 2004None

StopStop

public class StopStop extends Thread
Show stopping a Thread using deprecated stop() method.

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

		StopBoolean t1 = new StopBoolean();
		t1.start();
		Thread.sleep(1000*5);
		System.out.println("Stopping thread...");
		t1.stop();		// EXPECT COMPILER WARNING
	
public voidrun()

		while (true) {
			System.out.println("StopBoolean running");
			try {
				sleep(720);
			} catch (InterruptedException ex) {
				// nothing to do 
			}
		}