< prev index next >

src/java.base/share/classes/java/lang/Runnable.java

Print this page

45  * method and no other {@code Thread} methods.
46  * This is important because classes should not be subclassed
47  * unless the programmer intends on modifying or enhancing the fundamental
48  * behavior of the class.
49  *
50  * @author  Arthur van Hoff
51  * @see     java.lang.Thread
52  * @see     java.util.concurrent.Callable
53  * @since   1.0
54  */
55 @FunctionalInterface
56 public interface Runnable {
57     /**
58      * When an object implementing interface {@code Runnable} is used
59      * to create a thread, starting the thread causes the object's
60      * {@code run} method to be called in that separately executing
61      * thread.
62      * <p>
63      * The general contract of the method {@code run} is that it may
64      * take any action whatsoever.
65      *
66      * @see     java.lang.Thread#run()
67      */
68     public abstract void run();
69 }

45  * method and no other {@code Thread} methods.
46  * This is important because classes should not be subclassed
47  * unless the programmer intends on modifying or enhancing the fundamental
48  * behavior of the class.
49  *
50  * @author  Arthur van Hoff
51  * @see     java.lang.Thread
52  * @see     java.util.concurrent.Callable
53  * @since   1.0
54  */
55 @FunctionalInterface
56 public interface Runnable {
57     /**
58      * When an object implementing interface {@code Runnable} is used
59      * to create a thread, starting the thread causes the object's
60      * {@code run} method to be called in that separately executing
61      * thread.
62      * <p>
63      * The general contract of the method {@code run} is that it may
64      * take any action whatsoever.


65      */
66     public abstract void run();
67 }
< prev index next >