<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Wed Jul 28 01:21:15 GMT 1999 -->
<title>
  Interface java.lang.Runnable
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.lang.html">This Package</a>  <a href="java.lang.Cloneable.html#_top_">Previous</a>  <a href="Package-java.lang.html">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Interface java.lang.Runnable
</h1>
<dl>
  <dt> public interface <b>Runnable</b>
</dl>
The <code>Runnable</code> interface should be implemented by any 
 class whose instances are intended to be executed by a thread. The 
 class must define a method of no arguments called <code>run</code>.
 <p>
 This interface is designed to provide a common protocol for objects that
 wish to execute code while they are active. For example,
 <code>Runnable</code> is implemented by class <code>Thread</code>.
 Being active simply means that a thread has been started and has not
 yet been stopped. 
 <p>
 In addition, <code>Runnable</code> provides the means for a class to be
 active while not subclassing <code>Thread</code>. A class that implements
 <code>Runnable</code> can run without subclassing <code>Thread</code>
 by instantiating a <code>Thread</code> instance and passing itself in
 as the target.  In most cases, the <code>Runnable</code> interface should
 be used if you are only planning to override the <code>run()</code>
 method and no other <code>Thread</code> methods.  
 This is important because classes should not be subclassed
 unless the programmer intends on modifying or enhancing the fundamental
 behavior of the class.
<p>
<dl>
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.Thread.html#_top_">Thread</a>
</dl>
<hr>
<a name="index"></a>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#run()"><b>run</b></a>()
  <dd>  When an object implementing interface <code>Runnable</code> is used 
 to create a thread, starting the thread causes the object's 
 <code>run</code> method to be called in that separately executing 
 thread.
</dl>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="run()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="run"><b>run</b></a>
<pre>
 public abstract void run()
</pre>
<dl>
  <dd> When an object implementing interface <code>Runnable</code> is used 
 to create a thread, starting the thread causes the object's 
 <code>run</code> method to be called in that separately executing 
 thread.
<p>
  <dd><dl>
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.Thread.html#run()">run</a>
  </dl></dd>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.lang.html">This Package</a>  <a href="java.lang.Cloneable.html#_top_">Previous</a>  <a href="Package-java.lang.html">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
