20.19 The Interface java.lang.Runnable

Visual Studio 6.0

The Runnable interface should be implemented by any class whose instances are intended to be executed by a new thread. All that is required of such a class is that it implement a method of no arguments called run.

public interface Runnable {
	public abstract void run();
}

20.19.1 public abstract void run()

The general contract of the method run is that it may take any action whatsoever.

If an object implementing interface Runnable is used to create a thread (§20.20), then starting the thread will (normally) lead to the invocation of the object's run method in that separately executing thread.

Show: