Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.lang

Interface Runnable

java.lang.Object
|
+--java.lang.Runnable


public interface Runnable

Runnable is an interface you implement to indicate that your class can be executed as the main part of a Thread, among other places. When you want an entry point to run a piece of code, implement this interface and override run.

Since:Authors:See Also:

Method Summary

voidrun()

This method will be called by whoever wishes to run your class implementing Runnable.

Method Details

run

public void run()

This method will be called by whoever wishes to run your class implementing Runnable. Note that there are no restrictions on what you are allowed to do in the run method, except that you cannot throw a checked exception.